172173174175176177178
tempSize = Math.max( tempSize, index[ i ].maxCount ); } if ( hasPositions ) position = new int[ estimateForMaxCount ]; doc = new int[ numIndices ]; documentQueue = new IntHeapPriorityQueue( numIndices, new DocumentIndexComparator( doc ) ); }
626364656667686970
slot = 0; size = 0; // heap must have n+1 slots to hold extra item before removing smallest heap = new IntHeapPriorityQueue(n + 1, new SlotComparator()); // item lists are lazy-allocated }
5152535455565758
private IntHeapPriorityQueue freeList; public PackedPreferenceDataBuilder() { itemIndex = new MutableIdIndexMapping(); userIndex = new MutableIdIndexMapping(); freeList = new IntHeapPriorityQueue(); allocate(INITIAL_CHUNK_COUNT); }