/** * Create a new accumulator to accumulate the top <var>n</var> IDs. * * @param n The number of IDs to retain. */ public TopNLong2DoubleAccumulator(int n) { this.targetCount = n; slot = 0; size = 0; int isz = findInitialSize(targetCount + 1); scores = new DoubleArrayList(isz); items = new CompactableLongArrayList(isz); heap = new IntHeapPriorityQueue(this::comparePositions); // item lists are lazy-allocated }
int isz = findInitialSize(targetCount + 1); scores = new DoubleArrayList(isz); items = new CompactableLongArrayList(isz);
/** * Create a new accumulator to accumulate the top <var>n</var> IDs. * * @param n The number of IDs to retain. */ public TopNLong2DoubleAccumulator(int n) { this.targetCount = n; slot = 0; size = 0; int isz = findInitialSize(targetCount + 1); scores = new DoubleArrayList(isz); items = new CompactableLongArrayList(isz); heap = new IntHeapPriorityQueue(this::comparePositions); // item lists are lazy-allocated }
int isz = findInitialSize(targetCount + 1); scores = new DoubleArrayList(isz); items = new CompactableLongArrayList(isz);