/** Zeroes all counters, but not frequencies. */ public void clear() { IntArrays.fill( count, 0 ); }
/** Zeroes all counters, but not frequencies. */ public void clear() { IntArrays.fill( count, 0 ); }
public void reset() throws IOException { final int[][] position = this.position; final int[] curr = this.curr; final int[] count = this.count; IntArrays.fill( currPos, -1 ); for( int i = n; i-- != 0; ) { count[ i ] = indexIterator[ i ].count(); position[ i ] = indexIterator[ i ].positionArray(); curr[ i ] = Integer.MIN_VALUE; } next = null; toBeAligned = 1; endOfProcess = false; curr[ 0 ] = position[ 0 ][ currPos[ 0 ] = 0 ]; }
public void reset() throws IOException { final int[][] position = this.position; final int[] curr = this.curr; final int[] count = this.count; IntArrays.fill( currPos, -1 ); for( int i = n; i-- != 0; ) { count[ i ] = indexIterator[ i ].count(); position[ i ] = indexIterator[ i ].positionArray(); curr[ i ] = Integer.MIN_VALUE; } next = null; toBeAligned = 1; endOfProcess = false; curr[ 0 ] = position[ 0 ][ currPos[ 0 ] = 0 ]; }
/** Resets the iterator by calling the superclass method, and then aligning all iterators. * * <p>Note that in this class {@link #curr} is used to denote the value of the current position * minus the corresponding {@linkplain #gap cumulative gap}; this method updates {@link #curr} accordingly. */ public void reset() throws IOException { final int[][] position = this.position; final int[] currPos = this.currPos; final int[] curr = this.curr; final int[] count = this.count; final int[] gap = this.gap; IntArrays.fill( currPos, 0 ); for( int i = n; i-- != 0; ) { count[ i ] = indexIterator[ i ].count(); position[ i ] = indexIterator[ i ].positionArray(); curr[ i ] = position[ i ][ 0 ]; } endOfProcess = false; for( int i = n; i-- != 0; ) curr[ i ] -= gap[ i ]; if ( gap[ 0 ] != 0 ) { // Go beyond the 0-th gap. This must be done just once. next = null; while ( curr[ 0 ] < 0 && ++currPos[ 0 ] < count[ 0 ] ) curr[ 0 ] = position[ 0 ][ currPos[ 0 ] ] - gap[ 0 ]; endOfProcess = currPos[ 0 ] == count[ 0 ]; } if ( ! endOfProcess ) next = align(); }
/** Resets the iterator by calling the superclass method, and then aligning all iterators. * * <p>Note that in this class {@link #curr} is used to denote the value of the current position * minus the corresponding {@linkplain #gap cumulative gap}; this method updates {@link #curr} accordingly. */ public void reset() throws IOException { final int[][] position = this.position; final int[] currPos = this.currPos; final int[] curr = this.curr; final int[] count = this.count; final int[] gap = this.gap; IntArrays.fill( currPos, 0 ); for( int i = n; i-- != 0; ) { count[ i ] = indexIterator[ i ].count(); position[ i ] = indexIterator[ i ].positionArray(); curr[ i ] = position[ i ][ 0 ]; } endOfProcess = false; for( int i = n; i-- != 0; ) curr[ i ] -= gap[ i ]; if ( gap[ 0 ] != 0 ) { // Go beyond the 0-th gap. This must be done just once. next = null; while ( curr[ 0 ] < 0 && ++currPos[ 0 ] < count[ 0 ] ) curr[ 0 ] = position[ 0 ][ currPos[ 0 ] ] - gap[ 0 ]; endOfProcess = currPos[ 0 ] == count[ 0 ]; } if ( ! endOfProcess ) next = align(); }
fbis.position( start ); final long end = pointers.get( f ).getLong( index - firstDocument[ f ] + 1 ); IntArrays.fill( bufferSize, 0 ); metadata.clear(); int l, field;
fbis.position( start ); final long end = pointers.get( f ).getLong( index - firstDocument[ f ] + 1 ); IntArrays.fill( bufferSize, 0 ); metadata.clear(); int l, field;