HCOLL-172 Verified thath IntIntMultiMap now supports up to 2^32 entries; ShortShortMultiMap up to 2^16; ChronicleMap.Segment are now long-sized; attempt to support non-power-of-2 number of segments by HashSplitting (not tested yet); improved logic and dependencies between actualSegments(), actualEntriesPerSegments() and minSegments() methods in ChronicleMapBuilder; minor fixes

This commit is contained in:
leventov
2014-10-25 00:45:59 +04:00
parent 055349a97c
commit 061fc5b53b
15 changed files with 736 additions and 522 deletions
@@ -144,7 +144,7 @@ public class EntryCountMapTest {
map.acquireUsing(key, longValue);
longValue.setValue(1);
}
int[] a = ((VanillaChronicleMap) map).segmentSizes();
long[] a = ((VanillaChronicleMap) map).segmentSizes();
System.out.println("segs: " + segments + " min: " + minSize + " was " + map.size() + " "
+ Arrays.toString(a)
+ " sum: " + sum(a));
@@ -155,7 +155,7 @@ public class EntryCountMapTest {
scoreCount++;
boolean condition = minSize <= map.size() && map.size() <= maxSize;
if (!condition) {
int[] a = ((VanillaChronicleMap) map).segmentSizes();
long[] a = ((VanillaChronicleMap) map).segmentSizes();
System.out.println("segs: " + segments + " min: " + minSize + " was " + map.size() + " "
+ Arrays.toString(a)
+ " sum: " + sum(a));
@@ -166,9 +166,9 @@ public class EntryCountMapTest {
}
}
private long sum(int[] ints) {
private long sum(long[] longs) {
long sum = 0;
for (int i : ints) {
for (long i : longs) {
sum += i;
}
return sum;