JPP: Concerted zerdinal to long
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 1m11s
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 1m11s
This commit is contained in:
parent
e6ff02b8e0
commit
806121a09a
106 changed files with 443 additions and 446 deletions
|
|
@ -49,7 +49,7 @@ public class HinaryTest {
|
|||
|
||||
@Test
|
||||
public void testHinaryOrder() {
|
||||
Map<Integer, String> refMap = new HashMap<>();
|
||||
Map<Long, String> refMap = new HashMap<>();
|
||||
List<String> refSort = new ArrayList<>();
|
||||
for (T512ᖟ value : T512ᖟ.values()) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
|
|
@ -63,10 +63,10 @@ public class HinaryTest {
|
|||
}
|
||||
Collections.shuffle(refSort); // optional for this test
|
||||
Collections.sort(refSort);
|
||||
Assertions.assertEquals(refMap.get(0), refSort.get(0));
|
||||
Assertions.assertEquals(refMap.get(1), refSort.get(1));
|
||||
Assertions.assertEquals(refMap.get(0L), refSort.get(0));
|
||||
Assertions.assertEquals(refMap.get(1L), refSort.get(1));
|
||||
for (T512ᖟ value : T512ᖟ.values()) {
|
||||
Assertions.assertEquals(refMap.get(value.zerdinal()), refSort.get(value.zerdinal()));
|
||||
Assertions.assertEquals(refMap.get(value.zerdinal()), refSort.get((int) value.zerdinal()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,10 +66,9 @@ public class NumberMatrixFactoryTest {
|
|||
// size: 5 result: 120
|
||||
// size: 6 result: 720
|
||||
// -- gen line, 7+ has get only dial tones for IDENTITY_LE and IDENTITY_BE
|
||||
// 18+9=27(-x0) ~: 134217728 (end boundry lehman nether)
|
||||
// size: 7 result: 5040 (set of sealed or declared interface is too slow)
|
||||
// size: 8 result: 40320 (T256)
|
||||
// size: 9 result: 362880 (T512) (larger than max of 18 bit nether slug path)
|
||||
// size: 9 result: 362880 (T512)
|
||||
// size: 10 result: 3628800
|
||||
// size: 11 result: 39916800
|
||||
// size: 12 result: 479001600
|
||||
|
|
@ -77,11 +76,15 @@ public class NumberMatrixFactoryTest {
|
|||
// size: 14 result: 87178291200
|
||||
// size: 15 result: 1307674368000
|
||||
// size: 16 result: 20922789888000
|
||||
// 35184372088832 (2^45 = grouping of 6666669, for sizes up to 16)
|
||||
// size: 17 result: 355687428096000
|
||||
// size: 18 result: 6402373705728000
|
||||
// size: 19 result: 121645100408832000
|
||||
// size: 18 result: 6402373705728000 (V018Tord)
|
||||
// 18014398509481984 (2^54 = grouping of 96666669 for size 17 and 18)
|
||||
// size: 19 result: 121645100408832000
|
||||
// size: 20 result: 2432902008176640000
|
||||
// size: 21 result: -4249290049419214848 TODO: use BigInteger or limit to 18 bit
|
||||
// size: 21 result: -4249290049419214848 (long overflow)
|
||||
// collections2: size/zerdinal/offset/etc is signed long (63 bit)
|
||||
// collections2D: try <S extends NumberLegoValue> for 18 up to 2304 bit++
|
||||
for (int i = 5; i < 20; i++) {
|
||||
int[] rankFirst = calculateLehmerFromRank(0, i);
|
||||
long amount = calculateTotalPermutations(rankFirst);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue