|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Vec | Line # 44 | 133 | 30 | 75% |
0.75
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| (228) | |||
| Result | |||
|
0.44672132
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul5060
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul5060
|
3 FAIL | |
|
0.3237705
|
org.sat4j.core.VecTest.testSortUnique
org.sat4j.core.VecTest.testSortUnique
|
1 PASS | |
|
0.26229507
|
org.sat4j.core.VecTest.testSort
org.sat4j.core.VecTest.testSort
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH49
org.sat4j.minisat.AbstractM2Test.testJNH49
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH50
org.sat4j.minisat.AbstractM2Test.testJNH50
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testHole6
org.sat4j.minisat.AbstractM2Test.testHole6
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testHole7
org.sat4j.minisat.AbstractM2Test.testHole7
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testHole8
org.sat4j.minisat.AbstractM2Test.testHole8
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testHole9
org.sat4j.minisat.AbstractM2Test.testHole9
|
3 FAIL | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH41
org.sat4j.minisat.AbstractM2Test.testJNH41
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH42
org.sat4j.minisat.AbstractM2Test.testJNH42
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH43
org.sat4j.minisat.AbstractM2Test.testJNH43
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH44
org.sat4j.minisat.AbstractM2Test.testJNH44
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH45
org.sat4j.minisat.AbstractM2Test.testJNH45
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH46
org.sat4j.minisat.AbstractM2Test.testJNH46
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH47
org.sat4j.minisat.AbstractM2Test.testJNH47
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH48
org.sat4j.minisat.AbstractM2Test.testJNH48
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH23
org.sat4j.minisat.AbstractM2Test.testJNH23
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH24
org.sat4j.minisat.AbstractM2Test.testJNH24
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH21
org.sat4j.minisat.AbstractM2Test.testJNH21
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH22
org.sat4j.minisat.AbstractM2Test.testJNH22
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH19
org.sat4j.minisat.AbstractM2Test.testJNH19
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH20
org.sat4j.minisat.AbstractM2Test.testJNH20
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH17
org.sat4j.minisat.AbstractM2Test.testJNH17
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH18
org.sat4j.minisat.AbstractM2Test.testJNH18
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH15
org.sat4j.minisat.AbstractM2Test.testJNH15
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH16
org.sat4j.minisat.AbstractM2Test.testJNH16
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH13
org.sat4j.minisat.AbstractM2Test.testJNH13
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH14
org.sat4j.minisat.AbstractM2Test.testJNH14
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH11
org.sat4j.minisat.AbstractM2Test.testJNH11
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH12
org.sat4j.minisat.AbstractM2Test.testJNH12
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH9
org.sat4j.minisat.AbstractM2Test.testJNH9
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH10
org.sat4j.minisat.AbstractM2Test.testJNH10
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH40
org.sat4j.minisat.AbstractM2Test.testJNH40
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH39
org.sat4j.minisat.AbstractM2Test.testJNH39
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH38
org.sat4j.minisat.AbstractM2Test.testJNH38
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH37
org.sat4j.minisat.AbstractM2Test.testJNH37
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH36
org.sat4j.minisat.AbstractM2Test.testJNH36
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH35
org.sat4j.minisat.AbstractM2Test.testJNH35
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH34
org.sat4j.minisat.AbstractM2Test.testJNH34
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH33
org.sat4j.minisat.AbstractM2Test.testJNH33
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH32
org.sat4j.minisat.AbstractM2Test.testJNH32
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH31
org.sat4j.minisat.AbstractM2Test.testJNH31
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH30
org.sat4j.minisat.AbstractM2Test.testJNH30
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH29
org.sat4j.minisat.AbstractM2Test.testJNH29
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH28
org.sat4j.minisat.AbstractM2Test.testJNH28
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH27
org.sat4j.minisat.AbstractM2Test.testJNH27
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH26
org.sat4j.minisat.AbstractM2Test.testJNH26
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH25
org.sat4j.minisat.AbstractM2Test.testJNH25
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testAim50UNSAT8
org.sat4j.minisat.AbstractM2Test.testAim50UNSAT8
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH6
org.sat4j.minisat.AbstractM2Test.testJNH6
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH5
org.sat4j.minisat.AbstractM2Test.testJNH5
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH8
org.sat4j.minisat.AbstractM2Test.testJNH8
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH7
org.sat4j.minisat.AbstractM2Test.testJNH7
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH2
org.sat4j.minisat.AbstractM2Test.testJNH2
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH1
org.sat4j.minisat.AbstractM2Test.testJNH1
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH4
org.sat4j.minisat.AbstractM2Test.testJNH4
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testJNH3
org.sat4j.minisat.AbstractM2Test.testJNH3
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testAim50SAT12
org.sat4j.minisat.AbstractM2Test.testAim50SAT12
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testAim50SAT13
org.sat4j.minisat.AbstractM2Test.testAim50SAT13
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testAim50SAT14
org.sat4j.minisat.AbstractM2Test.testAim50SAT14
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testAim50SAT15
org.sat4j.minisat.AbstractM2Test.testAim50SAT15
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testAim50SAT8
org.sat4j.minisat.AbstractM2Test.testAim50SAT8
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testAim50SAT9
org.sat4j.minisat.AbstractM2Test.testAim50SAT9
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testAim50SAT11
org.sat4j.minisat.AbstractM2Test.testAim50SAT11
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testAim50UNSAT4
org.sat4j.minisat.AbstractM2Test.testAim50UNSAT4
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testAim50UNSAT5
org.sat4j.minisat.AbstractM2Test.testAim50UNSAT5
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testAim50UNSAT6
org.sat4j.minisat.AbstractM2Test.testAim50UNSAT6
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testAim50UNSAT7
org.sat4j.minisat.AbstractM2Test.testAim50UNSAT7
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testAim50UNSAT1
org.sat4j.minisat.AbstractM2Test.testAim50UNSAT1
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testAim50UNSAT2
org.sat4j.minisat.AbstractM2Test.testAim50UNSAT2
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testAim50UNSAT3
org.sat4j.minisat.AbstractM2Test.testAim50UNSAT3
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testAim50SAT5
org.sat4j.minisat.AbstractM2Test.testAim50SAT5
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testAim50SAT4
org.sat4j.minisat.AbstractM2Test.testAim50SAT4
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testAim50SAT7
org.sat4j.minisat.AbstractM2Test.testAim50SAT7
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testAim50SAT6
org.sat4j.minisat.AbstractM2Test.testAim50SAT6
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testAim50SAT1
org.sat4j.minisat.AbstractM2Test.testAim50SAT1
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testAim50SAT3
org.sat4j.minisat.AbstractM2Test.testAim50SAT3
|
1 PASS | |
|
0.21721311
|
org.sat4j.minisat.AbstractM2Test.testAim50SAT2
org.sat4j.minisat.AbstractM2Test.testAim50SAT2
|
1 PASS | |
|
0.2090164
|
org.sat4j.minisat.AbstractM2Test.testAim50SAT10
org.sat4j.minisat.AbstractM2Test.testAim50SAT10
|
1 PASS | |
|
0.2090164
|
org.sat4j.minisat.AbstractM2Test.testAim50SAT16
org.sat4j.minisat.AbstractM2Test.testAim50SAT16
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.AbstractM2Test.testIi12
org.sat4j.minisat.AbstractM2Test.testIi12
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.AbstractM2Test.testIi13
org.sat4j.minisat.AbstractM2Test.testIi13
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.AbstractM2Test.testIi14
org.sat4j.minisat.AbstractM2Test.testIi14
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.AbstractM2Test.testIi15
org.sat4j.minisat.AbstractM2Test.testIi15
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.AbstractM2Test.testIi8
org.sat4j.minisat.AbstractM2Test.testIi8
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.AbstractM2Test.testIi9
org.sat4j.minisat.AbstractM2Test.testIi9
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.AbstractM2Test.testIi10
org.sat4j.minisat.AbstractM2Test.testIi10
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.AbstractM2Test.testIi11
org.sat4j.minisat.AbstractM2Test.testIi11
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.AbstractM2Test.testIi4
org.sat4j.minisat.AbstractM2Test.testIi4
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.AbstractM2Test.testIi5
org.sat4j.minisat.AbstractM2Test.testIi5
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.AbstractM2Test.testIi6
org.sat4j.minisat.AbstractM2Test.testIi6
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.AbstractM2Test.testIi7
org.sat4j.minisat.AbstractM2Test.testIi7
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.AbstractM2Test.testIi1
org.sat4j.minisat.AbstractM2Test.testIi1
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.AbstractM2Test.testIi2
org.sat4j.minisat.AbstractM2Test.testIi2
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.AbstractM2Test.testIi3
org.sat4j.minisat.AbstractM2Test.testIi3
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.AbstractM2Test.testIi22
org.sat4j.minisat.AbstractM2Test.testIi22
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.AbstractM2Test.testIi21
org.sat4j.minisat.AbstractM2Test.testIi21
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.AbstractM2Test.testIi24
org.sat4j.minisat.AbstractM2Test.testIi24
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.AbstractM2Test.testIi23
org.sat4j.minisat.AbstractM2Test.testIi23
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.AbstractM2Test.testIi17
org.sat4j.minisat.AbstractM2Test.testIi17
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.AbstractM2Test.testIi16
org.sat4j.minisat.AbstractM2Test.testIi16
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.AbstractM2Test.testIi20
org.sat4j.minisat.AbstractM2Test.testIi20
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.AbstractM2Test.testIi18
org.sat4j.minisat.AbstractM2Test.testIi18
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg15
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg15
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg16
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg16
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg13
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg13
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg14
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg14
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg11
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg11
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg12
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg12
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg9
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg9
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg10
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg10
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg7
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg7
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg8
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg8
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg5
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg5
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg6
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg6
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg4
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg4
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg18
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg18
|
1 PASS | |
|
0.18032786
|
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg17
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg17
|
1 PASS | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN56
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN56
|
1 PASS | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN5
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN5
|
1 PASS | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN45
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN45
|
1 PASS | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN4
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN4
|
1 PASS | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN78
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN78
|
1 PASS | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN7
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN7
|
1 PASS | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testndata103
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testndata103
|
1 PASS | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN67
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN67
|
1 PASS | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testndata83
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testndata83
|
1 PASS | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN6
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN6
|
1 PASS | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testndata63
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testndata63
|
1 PASS | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testndata43
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testndata43
|
1 PASS | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testncirc103
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testncirc103
|
1 PASS | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testncirc83
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testncirc83
|
1 PASS | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testncirc63
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testncirc63
|
1 PASS | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN34
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN34
|
1 PASS | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testncirc43
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testncirc43
|
1 PASS | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN9
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN9
|
1 PASS | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN910
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN910
|
1 PASS | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN8
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN8
|
1 PASS | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN89
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN89
|
1 PASS | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN10
org.sat4j.minisat.constraints.AbstractPigeonHoleWithCardinalityTest.testPN10
|
3 FAIL | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul4050
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul4050
|
3 FAIL | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul4045
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul4045
|
3 FAIL | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul5055
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul5055
|
3 FAIL | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul5051
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul5051
|
3 FAIL | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul3540
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul3540
|
3 FAIL | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul3536
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul3536
|
3 FAIL | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul4041
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul4041
|
3 FAIL | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul3545
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul3545
|
3 FAIL | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul2030
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul2030
|
3 FAIL | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul3031
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul3031
|
3 FAIL | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul3035
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul3035
|
3 FAIL | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul3040
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul3040
|
3 FAIL | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul1520
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul1520
|
3 FAIL | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul1525
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul1525
|
3 FAIL | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul2021
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul2021
|
3 FAIL | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul2025
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul2025
|
3 FAIL | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul1011
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul1011
|
3 FAIL | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul1015
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul1015
|
3 FAIL | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul1020
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul1020
|
3 FAIL | |
|
0.1762295
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul1516
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testaloul1516
|
3 FAIL | |
|
0.17213115
|
org.sat4j.minisat.WatchedPBConstrWithPBConstrLearningOnCNFTest.testPropagation
org.sat4j.minisat.WatchedPBConstrWithPBConstrLearningOnCNFTest.testPropagation
|
1 PASS | |
|
0.17213115
|
org.sat4j.minisat.WatchedPBConstrWithClauseLearningOnCNFTest.testPropagation
org.sat4j.minisat.WatchedPBConstrWithClauseLearningOnCNFTest.testPropagation
|
1 PASS | |
|
0.17213115
|
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg3
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg3
|
1 PASS | |
|
0.17213115
|
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg1
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg1
|
1 PASS | |
|
0.17213115
|
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg2
org.sat4j.minisat.constraints.AbstractRandomCardProblemsTest.testRndDeg2
|
1 PASS | |
|
0.16393442
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testncc
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testncc
|
1 PASS | |
|
0.16393442
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testnc8
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testnc8
|
1 PASS | |
|
0.16393442
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testnb1
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testnb1
|
1 PASS | |
|
0.16393442
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testnC432
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testnC432
|
1 PASS | |
|
0.16393442
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testnC17
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testnC17
|
1 PASS | |
|
0.16393442
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testn9symml
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testn9symml
|
1 PASS | |
|
0.16393442
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testncm42a
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testncm42a
|
1 PASS | |
|
0.16393442
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testncmb
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testncmb
|
1 PASS | |
|
0.16393442
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testnmux
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testnmux
|
1 PASS | |
|
0.16393442
|
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testnmyadder
org.sat4j.minisat.constraints.AbstractPseudoBooleanAndPigeonHoleTest.testnmyadder
|
1 PASS | |
|
0.16393442
|
org.sat4j.SingleSolutionTest.testHasASingleSolution
org.sat4j.SingleSolutionTest.testHasASingleSolution
|
1 PASS | |
|
0.16393442
|
org.sat4j.SingleSolutionTest.testHasASingleSolutionIVecInt
org.sat4j.SingleSolutionTest.testHasASingleSolutionIVecInt
|
1 PASS | |
|
0.1557377
|
org.sat4j.minisat.CounterPBConstrWithClauseLearningOnCNFTest.testPropagation
org.sat4j.minisat.CounterPBConstrWithClauseLearningOnCNFTest.testPropagation
|
1 PASS | |
|
0.1557377
|
org.sat4j.minisat.CounterPBConstrWithPBConstrLearningOnCNFTest.testPropagation
org.sat4j.minisat.CounterPBConstrWithPBConstrLearningOnCNFTest.testPropagation
|
1 PASS | |
|
0.14344262
|
org.sat4j.core.VecTest.testMoveTo
org.sat4j.core.VecTest.testMoveTo
|
1 PASS | |
|
0.13934426
|
org.sat4j.minisat.reader.GoodOPBReaderTest.testEnigmaProblem
org.sat4j.minisat.reader.GoodOPBReaderTest.testEnigmaProblem
|
1 PASS | |
|
0.13934426
|
org.sat4j.minisat.reader.GoodOPBReaderTest.testDiscardTrailingComma
org.sat4j.minisat.reader.GoodOPBReaderTest.testDiscardTrailingComma
|
1 PASS | |
|
0.13934426
|
org.sat4j.minisat.reader.GoodOPBReaderTest.testProblemWithLeadingPlus
org.sat4j.minisat.reader.GoodOPBReaderTest.testProblemWithLeadingPlus
|
1 PASS | |
|
0.13934426
|
org.sat4j.minisat.WatchedPBConstrWithPBConstrLearningOnCNFTest.testPropagation2
org.sat4j.minisat.WatchedPBConstrWithPBConstrLearningOnCNFTest.testPropagation2
|
1 PASS | |
|
0.13934426
|
org.sat4j.minisat.WatchedPBConstrWithClauseLearningOnCNFTest.testPropagation2
org.sat4j.minisat.WatchedPBConstrWithClauseLearningOnCNFTest.testPropagation2
|
1 PASS | |
|
0.13934426
|
org.sat4j.core.VecTest.testSelectionSort
org.sat4j.core.VecTest.testSelectionSort
|
1 PASS | |
|
0.13934426
|
org.sat4j.minisat.reader.GoodOPBReaderTest.testSkipMaxObjectiveFunction
org.sat4j.minisat.reader.GoodOPBReaderTest.testSkipMaxObjectiveFunction
|
1 PASS | |
|
0.13934426
|
org.sat4j.minisat.reader.GoodOPBReaderTest.testReadCardinalityConstraints
org.sat4j.minisat.reader.GoodOPBReaderTest.testReadCardinalityConstraints
|
1 PASS | |
|
0.13934426
|
org.sat4j.minisat.reader.GoodOPBReaderTest.testSkipConstraintName
org.sat4j.minisat.reader.GoodOPBReaderTest.testSkipConstraintName
|
1 PASS | |
|
0.13934426
|
org.sat4j.minisat.reader.GoodOPBReaderTest.testReadPBConstraints
org.sat4j.minisat.reader.GoodOPBReaderTest.testReadPBConstraints
|
1 PASS | |
|
0.13934426
|
org.sat4j.minisat.reader.GoodOPBReaderTest.testReadProblematicCardinalityConstraints
org.sat4j.minisat.reader.GoodOPBReaderTest.testReadProblematicCardinalityConstraints
|
1 PASS | |
|
0.13934426
|
org.sat4j.minisat.reader.GoodOPBReaderTest.testReadProblematicPBConstraints
org.sat4j.minisat.reader.GoodOPBReaderTest.testReadProblematicPBConstraints
|
1 PASS | |
|
0.1352459
|
org.sat4j.ModelIteratorTest.testCardModel
org.sat4j.ModelIteratorTest.testCardModel
|
1 PASS | |
|
0.12704918
|
org.sat4j.ModelIteratorTest.testModelIterator
org.sat4j.ModelIteratorTest.testModelIterator
|
1 PASS | |
|
0.12704918
|
org.sat4j.ModelIteratorTest.testIncModel
org.sat4j.ModelIteratorTest.testIncModel
|
1 PASS | |
|
0.12295082
|
org.sat4j.minisat.CounterPBConstrWithClauseLearningOnCNFTest.testPropagation2
org.sat4j.minisat.CounterPBConstrWithClauseLearningOnCNFTest.testPropagation2
|
1 PASS | |
|
0.12295082
|
org.sat4j.minisat.CounterPBConstrWithPBConstrLearningOnCNFTest.testPropagation2
org.sat4j.minisat.CounterPBConstrWithPBConstrLearningOnCNFTest.testPropagation2
|
1 PASS | |
|
0.11885246
|
org.sat4j.core.VecTest.testCopyTo
org.sat4j.core.VecTest.testCopyTo
|
1 PASS | |
|
0.114754096
|
org.sat4j.minisat.constraints.pb.WatchPbTest.testNormalize
org.sat4j.minisat.constraints.pb.WatchPbTest.testNormalize
|
1 PASS | |
|
0.11065574
|
org.sat4j.ModelIteratorTest.testIsSatisfiableVecInt
org.sat4j.ModelIteratorTest.testIsSatisfiableVecInt
|
1 PASS | |
|
0.11065574
|
org.sat4j.core.VecTest.testEquals
org.sat4j.core.VecTest.testEquals
|
1 PASS | |
|
0.10655738
|
org.sat4j.core.VecTest.testDelete
org.sat4j.core.VecTest.testDelete
|
1 PASS | |
|
0.09836066
|
org.sat4j.core.VecTest.testShrinkTo
org.sat4j.core.VecTest.testShrinkTo
|
1 PASS | |
|
0.09016393
|
org.sat4j.core.VecTest.testShrink
org.sat4j.core.VecTest.testShrink
|
1 PASS | |
|
0.07786885
|
org.sat4j.core.VecTest.testGrowTointObject
org.sat4j.core.VecTest.testGrowTointObject
|
1 PASS | |
|
0.07786885
|
org.sat4j.core.VecTest.testPop
org.sat4j.core.VecTest.testPop
|
1 PASS | |
|
0.07786885
|
org.sat4j.core.VecTest.testGrowToint
org.sat4j.core.VecTest.testGrowToint
|
1 PASS | |
|
0.07786885
|
org.sat4j.core.VecTest.testIterator
org.sat4j.core.VecTest.testIterator
|
1 PASS | |
|
0.06557377
|
org.sat4j.core.VecTest.testLast
org.sat4j.core.VecTest.testLast
|
1 PASS | |
|
0.06557377
|
org.sat4j.core.VecTest.testPushObject
org.sat4j.core.VecTest.testPushObject
|
1 PASS | |
|
0.06557377
|
org.sat4j.core.VecTest.testPush
org.sat4j.core.VecTest.testPush
|
1 PASS | |
|
0.06557377
|
org.sat4j.core.VecTest.testSortEmpty
org.sat4j.core.VecTest.testSortEmpty
|
1 PASS | |
|
0.05327869
|
org.sat4j.core.VecTest.testGet
org.sat4j.core.VecTest.testGet
|
1 PASS | |
|
0.05327869
|
org.sat4j.minisat.reader.GoodOPBReaderTest.testSkipMinObjectiveFunction
org.sat4j.minisat.reader.GoodOPBReaderTest.testSkipMinObjectiveFunction
|
1 PASS | |
|
0.05327869
|
org.sat4j.minisat.reader.GoodOPBReaderTest.testIgnoreCommentedLines
org.sat4j.minisat.reader.GoodOPBReaderTest.testIgnoreCommentedLines
|
1 PASS | |
|
0.04918033
|
org.sat4j.core.VecTest.testVecintObject
org.sat4j.core.VecTest.testVecintObject
|
1 PASS | |
|
0.04918033
|
org.sat4j.core.VecTest.testSize
org.sat4j.core.VecTest.testSize
|
1 PASS | |
|
0.04918033
|
org.sat4j.core.VecTest.testVecint
org.sat4j.core.VecTest.testVecint
|
1 PASS | |
|
0.04918033
|
org.sat4j.core.VecTest.testClear
org.sat4j.core.VecTest.testClear
|
1 PASS | |
|
0.04918033
|
org.sat4j.core.VecTest.testNoSuchElementException
org.sat4j.core.VecTest.testNoSuchElementException
|
1 PASS | |
|
0.024590164
|
org.sat4j.core.VecTest.testVec
org.sat4j.core.VecTest.testVec
|
1 PASS | |
|
0.016393442
|
org.sat4j.minisat.constraints.LitTest.testTruthValue
org.sat4j.minisat.constraints.LitTest.testTruthValue
|
1 PASS | |
|
0.016393442
|
org.sat4j.minisat.VarOrderTest.testNewVar
org.sat4j.minisat.VarOrderTest.testNewVar
|
1 PASS | |
|
0.016393442
|
org.sat4j.minisat.constraints.LitTest.testNot
org.sat4j.minisat.constraints.LitTest.testNot
|
1 PASS | |
|
0.016393442
|
org.sat4j.minisat.constraints.LitTest.testToString
org.sat4j.minisat.constraints.LitTest.testToString
|
1 PASS | |
|
0.016393442
|
org.sat4j.minisat.constraints.LitTest.testEqualsObject
org.sat4j.minisat.constraints.LitTest.testEqualsObject
|
1 PASS | |
|
0.016393442
|
org.sat4j.minisat.constraints.LitTest.testVar
org.sat4j.minisat.constraints.LitTest.testVar
|
1 PASS | |
| 1 | /* | |
| 2 | * SAT4J: a SATisfiability library for Java Copyright (C) 2004-2006 Daniel Le Berre | |
| 3 | * | |
| 4 | * Based on the original minisat specification from: | |
| 5 | * | |
| 6 | * An extensible SAT solver. Niklas E?n and Niklas S?rensson. Proceedings of the | |
| 7 | * Sixth International Conference on Theory and Applications of Satisfiability | |
| 8 | * Testing, LNCS 2919, pp 502-518, 2003. | |
| 9 | * | |
| 10 | * This library is free software; you can redistribute it and/or modify it under | |
| 11 | * the terms of the GNU Lesser General Public License as published by the Free | |
| 12 | * Software Foundation; either version 2.1 of the License, or (at your option) | |
| 13 | * any later version. | |
| 14 | * | |
| 15 | * This library is distributed in the hope that it will be useful, but WITHOUT | |
| 16 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | |
| 17 | * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more | |
| 18 | * details. | |
| 19 | * | |
| 20 | * You should have received a copy of the GNU Lesser General Public License | |
| 21 | * along with this library; if not, write to the Free Software Foundation, Inc., | |
| 22 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 23 | * | |
| 24 | */ | |
| 25 | ||
| 26 | package org.sat4j.core; | |
| 27 | ||
| 28 | import java.io.Serializable; | |
| 29 | import java.util.Arrays; | |
| 30 | import java.util.Comparator; | |
| 31 | import java.util.Iterator; | |
| 32 | import java.util.NoSuchElementException; | |
| 33 | import java.util.Random; | |
| 34 | ||
| 35 | import org.sat4j.specs.IVec; | |
| 36 | ||
| 37 | /** | |
| 38 | * Simple but efficient vector implementation, based on the vector | |
| 39 | * implementation available in MiniSAT. Note that the elements are compared | |
| 40 | * using their references, not using the equals method. | |
| 41 | * | |
| 42 | * @author leberre | |
| 43 | */ | |
| 44 | public class Vec<T> implements Serializable, IVec<T> { | |
| 45 | ||
| 46 | private static final long serialVersionUID = 1L; | |
| 47 | ||
| 48 | private static final int RANDOM_SEED = 91648253; | |
| 49 | ||
| 50 | /** | |
| 51 | * Create a Vector with an initial capacity of 5 elements. | |
| 52 | */ | |
| 53 | 7183713 |
public Vec() { |
| 54 | 7183713 | this(5); |
| 55 | } | |
| 56 | ||
| 57 | /** | |
| 58 | * Adapter method to translate an array of int into an IVec. | |
| 59 | * | |
| 60 | * The array is used inside the Vec, so the elements may be modified outside | |
| 61 | * the Vec. But it should not take much memory. The size of the created Vec | |
| 62 | * is the length of the array. | |
| 63 | * | |
| 64 | * @param elts | |
| 65 | * a filled array of T. | |
| 66 | */ | |
| 67 | 397410 |
public Vec(T[] elts) { |
| 68 | 397410 | myarray = elts; |
| 69 | 397410 | nbelem = elts.length; |
| 70 | } | |
| 71 | ||
| 72 | /** | |
| 73 | * Create a Vector with a given capacity. | |
| 74 | * | |
| 75 | * @param size | |
| 76 | * the capacity of the vector. | |
| 77 | */ | |
| 78 | 9249733 |
@SuppressWarnings("unchecked") |
| 79 | public Vec(int size) { | |
| 80 | 9249733 | myarray = (T[]) new Object[size]; |
| 81 | } | |
| 82 | ||
| 83 | /** | |
| 84 | * Construit un vecteur contenant de taille size rempli a l'aide de size | |
| 85 | * pad. | |
| 86 | * | |
| 87 | * @param size | |
| 88 | * la taille du vecteur | |
| 89 | * @param pad | |
| 90 | * l'objet servant a remplir le vecteur | |
| 91 | */ | |
| 92 | 15 |
@SuppressWarnings("unchecked") |
| 93 | public Vec(int size, T pad) { | |
| 94 | 15 | myarray = (T[]) new Object[size]; |
| 95 | 74 | for (int i = 0; i < size; i++) { |
| 96 | 59 | myarray[i] = pad; |
| 97 | } | |
| 98 | 15 | nbelem = size; |
| 99 | } | |
| 100 | ||
| 101 | 2052217704 |
public int size() { |
| 102 | 2052217704 | return nbelem; |
| 103 | } | |
| 104 | ||
| 105 | /** | |
| 106 | * Remove nofelems from the Vector. It is assumed that the number of | |
| 107 | * elements to remove is smaller or equals to the current number of elements | |
| 108 | * in the vector | |
| 109 | * | |
| 110 | * @param nofelems | |
| 111 | * the number of elements to remove. | |
| 112 | */ | |
| 113 | 2 |
public void shrink(int nofelems) { |
| 114 | 2 | assert nofelems <= nbelem; |
| 115 | 12 | while (nofelems-- > 0) { |
| 116 | 10 | myarray[--nbelem] = null; |
| 117 | } | |
| 118 | } | |
| 119 | ||
| 120 | /** | |
| 121 | * reduce the Vector to exactly newsize elements | |
| 122 | * | |
| 123 | * @param newsize | |
| 124 | * the new size of the vector. | |
| 125 | */ | |
| 126 | 5 |
public void shrinkTo(final int newsize) { |
| 127 | 5 | assert newsize <= size(); |
| 128 | 30256 | for (int i = nbelem; i > newsize; i--) { |
| 129 | 30251 | myarray[i - 1] = null; |
| 130 | } | |
| 131 | 5 | nbelem = newsize; |
| 132 | 5 | assert size() == newsize; |
| 133 | } | |
| 134 | ||
| 135 | /** | |
| 136 | * Pop the last element on the stack. It is assumed that the stack is not | |
| 137 | * empty! | |
| 138 | */ | |
| 139 |
public void pop() { |
|
| 140 | assert size() > 0; | |
| 141 | myarray[--nbelem] = null; | |
| 142 | } | |
| 143 | ||
| 144 | 14 |
public void growTo(final int newsize, final T pad) { |
| 145 | 14 | assert newsize >= size(); |
| 146 | 14 | ensure(newsize); |
| 147 | 108 | for (int i = nbelem; i < newsize; i++) { |
| 148 | 94 | myarray[i] = pad; |
| 149 | } | |
| 150 | 14 | nbelem = newsize; |
| 151 | } | |
| 152 | ||
| 153 |
@SuppressWarnings("unchecked") |
|
| 154 | public final void ensure(final int nsize) { | |
| 155 | if (nsize >= myarray.length) { | |
| 156 | 223603990 | T[] narray = (T[]) new Object[Math.max(nsize, nbelem * 2)]; |
| 157 | 223603990 | System.arraycopy(myarray, 0, narray, 0, nbelem); |
| 158 | 223603990 | myarray = narray; |
| 159 | } | |
| 160 | } | |
| 161 | ||
| 162 | 571358376 |
public IVec<T> push(final T elem) { |
| 163 | 571358376 | ensure(nbelem + 1); |
| 164 | 571358376 | myarray[nbelem++] = elem; |
| 165 | 571358376 | return this; |
| 166 | } | |
| 167 | ||
| 168 | 0 |
public void unsafePush(final T elem) { |
| 169 | 0 | myarray[nbelem++] = elem; |
| 170 | } | |
| 171 | ||
| 172 | /** | |
| 173 | * Insert an element at the very begining of the vector. The former first | |
| 174 | * element is appended to the end of the vector in order to have a constant | |
| 175 | * time operation. | |
| 176 | * | |
| 177 | * @param elem | |
| 178 | * the element to put first in the vector. | |
| 179 | */ | |
| 180 | 0 |
public void insertFirst(final T elem) { |
| 181 | 0 | if (nbelem > 0) { |
| 182 | 0 | push(myarray[0]); |
| 183 | 0 | myarray[0] = elem; |
| 184 | 0 | return; |
| 185 | } | |
| 186 | 0 | push(elem); |
| 187 | } | |
| 188 | ||
| 189 | 74457 |
public void insertFirstWithShifting(final T elem) { |
| 190 | 74457 | if (nbelem > 0) { |
| 191 | 10732 | ensure(nbelem + 1); |
| 192 | 59433 | for (int i = nbelem; i > 0; i--) { |
| 193 | 48701 | myarray[i] = myarray[i - 1]; |
| 194 | } | |
| 195 | 10732 | myarray[0] = elem; |
| 196 | 10732 | nbelem++; |
| 197 | 10732 | return; |
| 198 | } | |
| 199 | 63725 | push(elem); |
| 200 | } | |
| 201 | ||
| 202 | 2040041842 |
public void clear() { |
| 203 | 2040041842 | Arrays.fill(myarray, 0, nbelem, null); |
| 204 | 2040041842 | nbelem = 0; |
| 205 | } | |
| 206 | ||
| 207 | /** | |
| 208 | * return the latest element on the stack. It is assumed that the stack is | |
| 209 | * not empty! | |
| 210 | * | |
| 211 | * @return the last element on the stack (the one on the top) | |
| 212 | */ | |
| 213 |
public T last() { |
|
| 214 | assert size() != 0; | |
| 215 | return myarray[nbelem - 1]; | |
| 216 | } | |
| 217 | ||
| 218 |
public T get(final int index) { |
|
| 219 | return myarray[index]; | |
| 220 | } | |
| 221 | ||
| 222 | 55653 |
public void set(int index, T elem) { |
| 223 | 55653 | myarray[index] = elem; |
| 224 | } | |
| 225 | ||
| 226 | /** | |
| 227 | * Remove an element that belongs to the Vector. The method will break if | |
| 228 | * the element does not belong to the vector. | |
| 229 | * | |
| 230 | * @param elem | |
| 231 | * an element from the vector. | |
| 232 | */ | |
| 233 | 60504 |
public void remove(T elem) { |
| 234 | 60504 | assert size() > 0; |
| 235 | 60504 | int j = 0; |
| 236 | 38393904 | for (; myarray[j] != elem; j++) { |
| 237 | 38333400 | assert j < size(); |
| 238 | } | |
| 239 | // arraycopy is always faster than manual copy | |
| 240 | 60504 | System.arraycopy(myarray, j + 1, myarray, j, size() - j - 1); |
| 241 | 60504 | myarray[--nbelem] = null; |
| 242 | } | |
| 243 | ||
| 244 | /** | |
| 245 | * Delete the ith element of the vector. The latest element of the vector | |
| 246 | * replaces the removed element at the ith indexer. | |
| 247 | * | |
| 248 | * @param index | |
| 249 | * the indexer of the element in the vector | |
| 250 | * @return the former ith element of the vector that is now removed from the | |
| 251 | * vector | |
| 252 | */ | |
| 253 | 2 |
public T delete(int index) { |
| 254 | 2 | assert index >= 0 && index < nbelem; |
| 255 | 2 | T ith = myarray[index]; |
| 256 | 2 | myarray[index] = myarray[--nbelem]; |
| 257 | 2 | myarray[nbelem] = null; |
| 258 | 2 | return ith; |
| 259 | } | |
| 260 | ||
| 261 | /** | |
| 262 | * Ces operations devraient se faire en temps constant. Ce n'est pas le | |
| 263 | * cas ici. | |
| 264 | * | |
| 265 | * @param copy | |
| 266 | */ | |
| 267 |
public void copyTo(IVec<T> copy) { |
|
| 268 | final Vec<T> ncopy = (Vec<T>) copy; | |
| 269 | final int nsize = nbelem + ncopy.nbelem; | |
| 270 | copy.ensure(nsize); | |
| 271 | System.arraycopy(myarray, 0, ncopy.myarray, ncopy.nbelem, nbelem); | |
| 272 | ncopy.nbelem = nsize; | |
| 273 | } | |
| 274 | ||
| 275 | /** | |
| 276 | * @param dest | |
| 277 | */ | |
| 278 | 2897309 |
public <E> void copyTo(E[] dest) { |
| 279 | 2897309 | assert dest.length >= nbelem; |
| 280 | 2897309 | System.arraycopy(myarray, 0, dest, 0, nbelem); |
| 281 | } | |
| 282 | ||
| 283 | /* | |
| 284 | * Copy one vector to another (cleaning the first), in constant time. | |
| 285 | */ | |
| 286 |
public void moveTo(IVec<T> dest) { |
|
| 287 | copyTo(dest); | |
| 288 | clear(); | |
| 289 | } | |
| 290 | ||
| 291 | 0 |
public void moveTo(int dest, int source) { |
| 292 | 0 | myarray[dest] = myarray[source]; |
| 293 | 0 | myarray[source] = null; |
| 294 | } | |
| 295 | ||
| 296 | 0 |
public T[] toArray() { |
| 297 | 0 | return myarray; |
| 298 | } | |
| 299 | ||
| 300 | private int nbelem; | |
| 301 | ||
| 302 | private T[] myarray; | |
| 303 | ||
| 304 | /* | |
| 305 | * (non-Javadoc) | |
| 306 | * | |
| 307 | * @see java.lang.Object#toString() | |
| 308 | */ | |
| 309 | 90 |
@Override |
| 310 | public String toString() { | |
| 311 | 90 | StringBuffer stb = new StringBuffer(); |
| 312 | 1800 | for (int i = 0; i < nbelem - 1; i++) { |
| 313 | 1710 | stb.append(myarray[i]); |
| 314 | 1710 | stb.append(","); //$NON-NLS-1$ |
| 315 | } | |
| 316 | 90 | if (nbelem > 0) { |
| 317 | 90 | stb.append(myarray[nbelem - 1]); |
| 318 | } | |
| 319 | 90 | return stb.toString(); |
| 320 | } | |
| 321 | ||
| 322 | private static Random rand = new Random(RANDOM_SEED); | |
| 323 | ||
| 324 | 7335 |
void selectionSort(int from, int to, Comparator<T> cmp) { |
| 325 | 7335 | int i, j, best_i; |
| 326 | 7335 | T tmp; |
| 327 | ||
| 328 | 60779 | for (i = from; i < to - 1; i++) { |
| 329 | 53444 | best_i = i; |
| 330 | 338440 | for (j = i + 1; j < to; j++) { |
| 331 | 284996 | if (cmp.compare(myarray[j], myarray[best_i]) < 0) |
| 332 | 52972 | best_i = j; |
| 333 | } | |
| 334 | 53444 | tmp = myarray[i]; |
| 335 | 53444 | myarray[i] = myarray[best_i]; |
| 336 | 53444 | myarray[best_i] = tmp; |
| 337 | } | |
| 338 | } | |
| 339 | ||
| 340 | 14662 |
void sort(int from, int to, Comparator<T> cmp) { |
| 341 | 14662 | int width = to - from; |
| 342 | 14662 | if (to - from <= 15) |
| 343 | 7334 | selectionSort(from, to, cmp); |
| 344 | ||
| 345 | else { | |
| 346 | 7328 | T pivot = myarray[rand.nextInt(width) + from]; |
| 347 | 7328 | T tmp; |
| 348 | 7328 | int i = from - 1; |
| 349 | 7328 | int j = to; |
| 350 | ||
| 351 | 7328 | for (;;) { |
| 352 | 147194 | do |
| 353 | 498077 | i++; |
| 354 | 498077 | while (cmp.compare(myarray[i], pivot) < 0); |
| 355 | 147194 | do |
| 356 | 472835 | j--; |
| 357 | 472835 | while (cmp.compare(pivot, myarray[j]) < 0); |
| 358 | ||
| 359 | 147194 | if (i >= j) |
| 360 | 7328 | break; |
| 361 | ||
| 362 | 139866 | tmp = myarray[i]; |
| 363 | 139866 | myarray[i] = myarray[j]; |
| 364 | 139866 | myarray[j] = tmp; |
| 365 | } | |
| 366 | ||
| 367 | 7328 | sort(from, i, cmp); |
| 368 | 7328 | sort(i, to, cmp); |
| 369 | } | |
| 370 | } | |
| 371 | ||
| 372 | /** | |
| 373 | * @param comparator | |
| 374 | */ | |
| 375 | 5 |
public void sort(Comparator<T> comparator) { |
| 376 | 5 | sort(0, nbelem, comparator); |
| 377 | } | |
| 378 | ||
| 379 | 1 |
public void sortUnique(Comparator<T> cmp) { |
| 380 | 1 | int i, j; |
| 381 | 1 | T last; |
| 382 | ||
| 383 | 1 | if (nbelem == 0) |
| 384 | 0 | return; |
| 385 | ||
| 386 | 1 | sort(0, nbelem, cmp); |
| 387 | ||
| 388 | 1 | i = 1; |
| 389 | 1 | last = myarray[0]; |
| 390 | 106 | for (j = 1; j < nbelem; j++) { |
| 391 | 105 | if (cmp.compare(last, myarray[j]) < 0) { |
| 392 | 100 | last = myarray[i] = myarray[j]; |
| 393 | 100 | i++; |
| 394 | } | |
| 395 | } | |
| 396 | ||
| 397 | 1 | nbelem = i; |
| 398 | } | |
| 399 | ||
| 400 | /* | |
| 401 | * (non-Javadoc) | |
| 402 | * | |
| 403 | * @see java.lang.Object#equals(java.lang.Object) | |
| 404 | */ | |
| 405 | 21 |
@Override |
| 406 | public boolean equals(Object obj) { | |
| 407 | 21 | if (obj instanceof IVec) { |
| 408 | 21 | IVec<?> v = (IVec<?>) obj; |
| 409 | 21 | if (v.size() != size()) |
| 410 | 2 | return false; |
| 411 | 334 | for (int i = 0; i < size(); i++) { |
| 412 | 316 | if (!v.get(i).equals(get(i))) { |
| 413 | 1 | return false; |
| 414 | } | |
| 415 | } | |
| 416 | 18 | return true; |
| 417 | } | |
| 418 | 0 | return false; |
| 419 | } | |
| 420 | ||
| 421 | /* | |
| 422 | * (non-Javadoc) | |
| 423 | * | |
| 424 | * @see java.lang.Object#hashCode() | |
| 425 | */ | |
| 426 | 0 |
@Override |
| 427 | public int hashCode() { | |
| 428 | 0 | int sum = 0; |
| 429 | 0 | for (int i = 0; i < nbelem; i++) { |
| 430 | 0 | sum += myarray[i].hashCode() / nbelem; |
| 431 | } | |
| 432 | 0 | return sum; |
| 433 | } | |
| 434 | ||
| 435 | 6 |
public Iterator<T> iterator() { |
| 436 | 6 | return new Iterator<T>() { |
| 437 | private int i = 0; | |
| 438 | ||
| 439 | 9 |
public boolean hasNext() { |
| 440 | 9 | return i < nbelem; |
| 441 | } | |
| 442 | ||
| 443 | 4 |
public T next() { |
| 444 | 4 | if (i == nbelem) |
| 445 | 1 | throw new NoSuchElementException(); |
| 446 | 3 | return myarray[i++]; |
| 447 | } | |
| 448 | ||
| 449 | 0 |
public void remove() { |
| 450 | 0 | throw new UnsupportedOperationException(); |
| 451 | } | |
| 452 | }; | |
| 453 | } | |
| 454 | ||
| 455 | 0 |
public boolean isEmpty() { |
| 456 | 0 | return nbelem == 0; |
| 457 | } | |
| 458 | } | |
|
||||||||||