public Reference2ReferenceMap<Index, IntervalIterator> intervalIterators() { return Reference2ReferenceMaps.singleton( soleIndex, IntervalIterators.TRUE ); }
public Reference2ReferenceMap<Index, IntervalIterator> intervalIterators() { return Reference2ReferenceMaps.singleton( soleIndex, IntervalIterators.TRUE ); }
protected AbstractQuasiSuccinctIndexIterator( final QuasiSuccinctIndexReader indexReader ) { this.indexReader = indexReader; index = indexReader.index; keyIndex = index.keyIndex; hasPositions = index.hasPositions; hasCounts = index.hasCounts; numberOfDocuments = index.numberOfDocuments; pointersList = indexReader.pointersList; countsList = indexReader.countsList; positionsList = indexReader.positionsList; intervalIterator = hasPositions ? new IndexIntervalIterator( this ) : IntervalIterators.FALSE; singletonIntervalIterator = Reference2ReferenceMaps.singleton( keyIndex, hasPositions ? intervalIterator : IntervalIterators.FALSE ); currentTerm = frequency = -1; }
protected TrueDocumentIterator( final Index index ) { indices = ReferenceSets.singleton( soleIndex = index ); intervalIterators = Reference2ReferenceMaps.singleton( soleIndex, IntervalIterators.TRUE ); }
protected TrueDocumentIterator( final Index index ) { indices = ReferenceSets.singleton( soleIndex = index ); intervalIterators = Reference2ReferenceMaps.singleton( soleIndex, IntervalIterators.TRUE ); }
protected AbstractQuasiSuccinctIndexIterator( final QuasiSuccinctIndexReader indexReader ) { this.indexReader = indexReader; index = indexReader.index; keyIndex = index.keyIndex; hasPositions = index.hasPositions; hasCounts = index.hasCounts; numberOfDocuments = index.numberOfDocuments; pointersList = indexReader.pointersList; countsList = indexReader.countsList; positionsList = indexReader.positionsList; intervalIterator = hasPositions ? new IndexIntervalIterator( this ) : null; singletonIntervalIterator = hasPositions ? Reference2ReferenceMaps.singleton( keyIndex, (IntervalIterator)intervalIterator ) : null; currentTerm = frequency = -1; }
public BitStreamIndexReaderIndexIterator( final GammaDeltaGammaDeltaBitStreamIndexReader parent, final InputBitStream ibs ) { this.parent = parent; this.ibs = ibs; index = parent.index; keyIndex = index.keyIndex; pointerCoding = index.pointerCoding; if ( index.hasPayloads ) throw new IllegalStateException(); if ( ! index.hasCounts ) throw new IllegalStateException(); countCoding = index.countCoding; if ( ! index.hasPositions ) throw new IllegalStateException(); positionCoding = index.positionCoding; positionCache = new int[ POSITION_CACHE_INITIAL_SIZE ]; intervalIterator = index.hasPositions ? new it.unimi.di.big.mg4j.index.IndexIntervalIterator( this ) : null; singletonIntervalIterator = index.hasPositions ? Reference2ReferenceMaps.singleton( keyIndex, (IntervalIterator)intervalIterator ) : null; }
public BitStreamIndexReaderIndexIterator( final GammaDeltaGammaDeltaBitStreamIndexReader parent, final InputBitStream ibs ) { this.parent = parent; this.ibs = ibs; index = parent.index; keyIndex = index.keyIndex; pointerCoding = index.pointerCoding; if ( index.hasPayloads ) throw new IllegalStateException(); if ( ! index.hasCounts ) throw new IllegalStateException(); countCoding = index.countCoding; if ( ! index.hasPositions ) throw new IllegalStateException(); positionCoding = index.positionCoding; positionCache = new int[ POSITION_CACHE_INITIAL_SIZE ]; intervalIterator = index.hasPositions ? new it.unimi.di.mg4j.index.IndexIntervalIterator( this ) : null; singletonIntervalIterator = index.hasPositions ? Reference2ReferenceMaps.singleton( keyIndex, (IntervalIterator)intervalIterator ) : null; } /** Positions the index on the inverted list of a given term.
singletonIntervalIterator = index.hasPositions ? Reference2ReferenceMaps.singleton( keyIndex, (IntervalIterator)intervalIterator ) : null;
positionCache = new int[ POSITION_CACHE_INITIAL_SIZE ]; intervalIterator = index.hasPositions ? new it.unimi.di.mg4j.index.IndexIntervalIterator( this ) : null; singletonIntervalIterator = index.hasPositions ? Reference2ReferenceMaps.singleton( keyIndex, (IntervalIterator)intervalIterator ) : null; if ( ( index.quantum == -1 ) != ( index.height == -1 ) ) throw new IllegalArgumentException(); height = index.height;
public BitStreamHPIndexReaderIndexIterator( final BitStreamHPIndexReader parent, final InputBitStream ibs, final InputBitStream positions ) { this.parent = parent; this.ibs = ibs; this.positions = positions; index = parent.index; keyIndex = index.keyIndex; pointerCoding = index.pointerCoding; countCoding = index.countCoding; positionCoding = index.positionCoding; intervalIterator = new IndexIntervalIterator(); singletonIntervalIterator = Reference2ReferenceMaps.singleton( keyIndex, (IntervalIterator)intervalIterator ); height = index.height; if ( ! ( variableQuanta = index.quantum == 0 ) ) { quantum = index.quantum; quantumModuloMask = quantum - 1; quantumDivisionShift = Fast.mostSignificantBit( quantum ); w = ( 1L << height ) * quantum; wModuloMask = w - 1; wDivisionShift = Fast.mostSignificantBit( w ); } bitSkip = new long[ height + 1 ]; positionsBitSkip = new long[ height + 1 ]; pointerSkip = new int[ height + 1 ]; towerTopB = new int[ height + 1 ]; towerTopLog2B = new int[ height + 1 ]; towerLowerB = new int[ height + 1 ]; towerLowerLog2B = new int[ height + 1 ]; pointerPrediction = new int[ height + 1 ]; }
public BitStreamHPIndexReaderIndexIterator( final GammaDeltaGammaDeltaBitStreamHPIndexReader parent, final InputBitStream ibs, final InputBitStream positions ) { this.parent = parent; this.ibs = ibs; this.positions = positions; index = parent.index; keyIndex = index.keyIndex; pointerCoding = index.pointerCoding; countCoding = index.countCoding; positionCoding = index.positionCoding; intervalIterator = new it.unimi.di.big.mg4j.index.IndexIntervalIterator( this ); singletonIntervalIterator = Reference2ReferenceMaps.singleton( keyIndex, (IntervalIterator)intervalIterator ); height = index.height; if ( ! ( variableQuanta = index.quantum == 0 ) ) { quantum = index.quantum; quantumModuloMask = quantum - 1; quantumDivisionShift = Fast.mostSignificantBit( quantum ); w = ( 1L << height ) * quantum; wModuloMask = w - 1; wDivisionShift = Fast.mostSignificantBit( w ); } bitSkip = new long[ height + 1 ]; positionsBitSkip = new long[ height + 1 ]; pointerSkip = new long[ height + 1 ]; towerTopB = new int[ height + 1 ]; towerTopLog2B = new int[ height + 1 ]; towerLowerB = new int[ height + 1 ]; towerLowerLog2B = new int[ height + 1 ]; pointerPrediction = new long[ height + 1 ]; }
public BitStreamHPIndexReaderIndexIterator( final BitStreamHPIndexReader parent, final InputBitStream ibs, final InputBitStream positions ) { this.parent = parent; this.ibs = ibs; this.positions = positions; index = parent.index; keyIndex = index.keyIndex; pointerCoding = index.pointerCoding; countCoding = index.countCoding; positionCoding = index.positionCoding; intervalIterator = new it.unimi.di.big.mg4j.index.IndexIntervalIterator( this ); singletonIntervalIterator = Reference2ReferenceMaps.singleton( keyIndex, (IntervalIterator)intervalIterator ); height = index.height; if ( ! ( variableQuanta = index.quantum == 0 ) ) { quantum = index.quantum; quantumModuloMask = quantum - 1; quantumDivisionShift = Fast.mostSignificantBit( quantum ); w = ( 1L << height ) * quantum; wModuloMask = w - 1; wDivisionShift = Fast.mostSignificantBit( w ); } bitSkip = new long[ height + 1 ]; positionsBitSkip = new long[ height + 1 ]; pointerSkip = new long[ height + 1 ]; towerTopB = new int[ height + 1 ]; towerTopLog2B = new int[ height + 1 ]; towerLowerB = new int[ height + 1 ]; towerLowerLog2B = new int[ height + 1 ]; pointerPrediction = new long[ height + 1 ]; }
public BitStreamHPIndexReaderIndexIterator( final BitStreamHPIndexReader parent, final InputBitStream ibs, final InputBitStream positions ) { this.parent = parent; this.ibs = ibs; this.positions = positions; index = parent.index; keyIndex = index.keyIndex; pointerCoding = index.pointerCoding; countCoding = index.countCoding; positionCoding = index.positionCoding; intervalIterator = new IndexIntervalIterator(); singletonIntervalIterator = Reference2ReferenceMaps.singleton( keyIndex, (IntervalIterator)intervalIterator ); height = index.height; if ( ! ( variableQuanta = index.quantum == 0 ) ) { quantum = index.quantum; quantumModuloMask = quantum - 1; quantumDivisionShift = Fast.mostSignificantBit( quantum ); w = ( 1L << height ) * quantum; wModuloMask = w - 1; wDivisionShift = Fast.mostSignificantBit( w ); } bitSkip = new long[ height + 1 ]; positionsBitSkip = new long[ height + 1 ]; pointerSkip = new long[ height + 1 ]; towerTopB = new int[ height + 1 ]; towerTopLog2B = new int[ height + 1 ]; towerLowerB = new int[ height + 1 ]; towerLowerLog2B = new int[ height + 1 ]; pointerPrediction = new long[ height + 1 ]; }
public BitStreamHPIndexReaderIndexIterator( final BitStreamHPIndexReader parent, final InputBitStream ibs, final InputBitStream positions ) { this.parent = parent; this.ibs = ibs; this.positions = positions; index = parent.index; keyIndex = index.keyIndex; pointerCoding = index.pointerCoding; countCoding = index.countCoding; positionCoding = index.positionCoding; intervalIterator = new it.unimi.di.mg4j.index.IndexIntervalIterator( this ); singletonIntervalIterator = Reference2ReferenceMaps.singleton( keyIndex, (IntervalIterator)intervalIterator ); height = index.height; if ( ! ( variableQuanta = index.quantum == 0 ) ) { quantum = index.quantum; quantumModuloMask = quantum - 1; quantumDivisionShift = Fast.mostSignificantBit( quantum ); w = ( 1L << height ) * quantum; wModuloMask = w - 1; wDivisionShift = Fast.mostSignificantBit( w ); } bitSkip = new long[ height + 1 ]; positionsBitSkip = new long[ height + 1 ]; pointerSkip = new int[ height + 1 ]; towerTopB = new int[ height + 1 ]; towerTopLog2B = new int[ height + 1 ]; towerLowerB = new int[ height + 1 ]; towerLowerLog2B = new int[ height + 1 ]; pointerPrediction = new int[ height + 1 ]; } /** Debug variable, usually unused, that keeps track of the end of the positions stream for the current term (but not for term 0!). */
public BitStreamHPIndexReaderIndexIterator( final GammaDeltaGammaDeltaBitStreamHPIndexReader parent, final InputBitStream ibs, final InputBitStream positions ) { this.parent = parent; this.ibs = ibs; this.positions = positions; index = parent.index; keyIndex = index.keyIndex; pointerCoding = index.pointerCoding; countCoding = index.countCoding; positionCoding = index.positionCoding; intervalIterator = new it.unimi.di.mg4j.index.IndexIntervalIterator( this ); singletonIntervalIterator = Reference2ReferenceMaps.singleton( keyIndex, (IntervalIterator)intervalIterator ); height = index.height; if ( ! ( variableQuanta = index.quantum == 0 ) ) { quantum = index.quantum; quantumModuloMask = quantum - 1; quantumDivisionShift = Fast.mostSignificantBit( quantum ); w = ( 1L << height ) * quantum; wModuloMask = w - 1; wDivisionShift = Fast.mostSignificantBit( w ); } bitSkip = new long[ height + 1 ]; positionsBitSkip = new long[ height + 1 ]; pointerSkip = new int[ height + 1 ]; towerTopB = new int[ height + 1 ]; towerTopLog2B = new int[ height + 1 ]; towerLowerB = new int[ height + 1 ]; towerLowerLog2B = new int[ height + 1 ]; pointerPrediction = new int[ height + 1 ]; } /** Debug variable, usually unused, that keeps track of the end of the positions stream for the current term (but not for term 0!). */
if ( hasPositions ) positionCache = new int[ POSITION_CACHE_INITIAL_SIZE ]; intervalIterator = index.hasPositions ? new IndexIntervalIterator() : null; singletonIntervalIterator = index.hasPositions ? Reference2ReferenceMaps.singleton( keyIndex, (IntervalIterator)intervalIterator ) : null; if ( ( index.quantum == -1 ) != ( index.height == -1 ) ) throw new IllegalArgumentException(); height = index.height;
if ( hasPositions ) positionCache = new int[ POSITION_CACHE_INITIAL_SIZE ]; intervalIterator = index.hasPositions ? new it.unimi.di.mg4j.index.IndexIntervalIterator( this ) : null; singletonIntervalIterator = index.hasPositions ? Reference2ReferenceMaps.singleton( keyIndex, (IntervalIterator)intervalIterator ) : null; if ( ( index.quantum == -1 ) != ( index.height == -1 ) ) throw new IllegalArgumentException(); height = index.height;
if ( hasPositions ) positionCache = new int[ POSITION_CACHE_INITIAL_SIZE ]; intervalIterator = index.hasPositions ? new IndexIntervalIterator() : null; singletonIntervalIterator = index.hasPositions ? Reference2ReferenceMaps.singleton( keyIndex, (IntervalIterator)intervalIterator ) : null; if ( ( index.quantum == -1 ) != ( index.height == -1 ) ) throw new IllegalArgumentException(); height = index.height;
singletonIntervalIterator = index.hasPositions ? Reference2ReferenceMaps.singleton( keyIndex, (IntervalIterator)intervalIterator ) : null;