/** * Returns a shallow clone of this instance (the underlying longs are * <b>not</b> copied and will be shared by both the returned object and this * object. * * @see #deepCopyOf */ @Override public LongsRef clone() { return new LongsRef(longs, offset, length); }
/** * Creates a new LongsRef that points to a copy of the longs from * <code>other</code> * <p> * The returned IntsRef will have a length of other.length * and an offset of zero. */ public static LongsRef deepCopyOf(LongsRef other) { return new LongsRef(ArrayUtil.copyOfSubArray(other.longs, other.offset, other.offset + other.length), 0, other.length); }
/** Sole constructor. * @param blockSize the number of values of a block, must be equal to the * block size of the {@link BlockPackedWriter} which has * been used to write the stream */ public BlockPackedReaderIterator(DataInput in, int packedIntsVersion, int blockSize, long valueCount) { checkBlockSize(blockSize, MIN_BLOCK_SIZE, MAX_BLOCK_SIZE); this.packedIntsVersion = packedIntsVersion; this.blockSize = blockSize; this.values = new long[blockSize]; this.valuesRef = new LongsRef(this.values, 0, 0); reset(in, valueCount); }
PackedReaderIterator(PackedInts.Format format, int packedIntsVersion, int valueCount, int bitsPerValue, DataInput in, int mem) { super(valueCount, bitsPerValue, in); this.format = format; this.packedIntsVersion = packedIntsVersion; bulkOperation = BulkOperation.of(format, bitsPerValue); iterations = bulkOperation.computeIterations(valueCount, mem); assert valueCount == 0 || iterations > 0; nextBlocks = new byte[iterations * bulkOperation.byteBlockCount()]; nextValues = new LongsRef(new long[iterations * bulkOperation.byteValueCount()], 0, 0); nextValues.offset = nextValues.longs.length; position = -1; }
public OrdinalsBuilder(int maxDoc, float acceptableOverheadRatio) { this.maxDoc = maxDoc; int startBitsPerValue = 8; ordinals = new OrdinalsStore(maxDoc, startBitsPerValue, acceptableOverheadRatio); spare = new LongsRef(); }
/** * Returns a shallow clone of this instance (the underlying longs are * <b>not</b> copied and will be shared by both the returned object and this * object. * * @see #deepCopyOf */ @Override public LongsRef clone() { return new LongsRef(longs, offset, length); }
/** * Returns a shallow clone of this instance (the underlying longs are * <b>not</b> copied and will be shared by both the returned object and this * object. * * @see #deepCopyOf */ @Override public LongsRef clone() { return new LongsRef(longs, offset, length); }
/** * Returns a shallow clone of this instance (the underlying longs are * <b>not</b> copied and will be shared by both the returned object and this * object. * * @see #deepCopyOf */ @Override public LongsRef clone() { return new LongsRef(longs, offset, length); }
/** * Creates a new LongsRef that points to a copy of the longs from * <code>other</code> * <p> * The returned IntsRef will have a length of other.length * and an offset of zero. */ public static LongsRef deepCopyOf(LongsRef other) { return new LongsRef(Arrays.copyOfRange(other.longs, other.offset, other.offset + other.length), 0, other.length); }
/** * Creates a new LongsRef that points to a copy of the longs from * <code>other</code> * <p> * The returned IntsRef will have a length of other.length * and an offset of zero. */ public static LongsRef deepCopyOf(LongsRef other) { return new LongsRef(Arrays.copyOfRange(other.longs, other.offset, other.offset + other.length), 0, other.length); }
/** * Creates a new LongsRef that points to a copy of the longs from * <code>other</code> * <p> * The returned IntsRef will have a length of other.length * and an offset of zero. */ public static LongsRef deepCopyOf(LongsRef other) { return new LongsRef(ArrayUtil.copyOfSubArray(other.longs, other.offset, other.offset + other.length), 0, other.length); }
public OrdinalsBuilder(int maxDoc, float acceptableOverheadRatio) throws IOException { this.maxDoc = maxDoc; int startBitsPerValue = 8; ordinals = new OrdinalsStore(maxDoc, startBitsPerValue, acceptableOverheadRatio); spare = new LongsRef(); }
public OrdinalsBuilder(int maxDoc, float acceptableOverheadRatio) throws IOException { this.maxDoc = maxDoc; int startBitsPerValue = 8; ordinals = new OrdinalsStore(maxDoc, startBitsPerValue, acceptableOverheadRatio); spare = new LongsRef(); }
public OrdinalsBuilder(int maxDoc, float acceptableOverheadRatio) throws IOException { this.maxDoc = maxDoc; int startBitsPerValue = 8; ordinals = new OrdinalsStore(maxDoc, startBitsPerValue, acceptableOverheadRatio); spare = new LongsRef(); }
/** Sole constructor. * @param blockSize the number of values of a block, must be equal to the * block size of the {@link BlockPackedWriter} which has * been used to write the stream */ public BlockPackedReaderIterator(DataInput in, int packedIntsVersion, int blockSize, long valueCount) { checkBlockSize(blockSize, MIN_BLOCK_SIZE, MAX_BLOCK_SIZE); this.packedIntsVersion = packedIntsVersion; this.blockSize = blockSize; this.values = new long[blockSize]; this.valuesRef = new LongsRef(this.values, 0, 0); reset(in, valueCount); }
/** Sole constructor. * @param blockSize the number of values of a block, must be equal to the * block size of the {@link BlockPackedWriter} which has * been used to write the stream */ public BlockPackedReaderIterator(DataInput in, int packedIntsVersion, int blockSize, long valueCount) { checkBlockSize(blockSize, MIN_BLOCK_SIZE, MAX_BLOCK_SIZE); this.packedIntsVersion = packedIntsVersion; this.blockSize = blockSize; this.values = new long[blockSize]; this.valuesRef = new LongsRef(this.values, 0, 0); reset(in, valueCount); }
public OrdinalsBuilder(long numTerms, int maxDoc, float acceptableOverheadRatio) throws IOException { this.maxDoc = maxDoc; int startBitsPerValue = 8; if (numTerms >= 0) { startBitsPerValue = PackedInts.bitsRequired(numTerms); } ordinals = new OrdinalsStore(maxDoc, startBitsPerValue, acceptableOverheadRatio); spare = new LongsRef(); }
PackedReaderIterator(PackedInts.Format format, int packedIntsVersion, int valueCount, int bitsPerValue, DataInput in, int mem) { super(valueCount, bitsPerValue, in); this.format = format; this.packedIntsVersion = packedIntsVersion; bulkOperation = BulkOperation.of(format, bitsPerValue); iterations = bulkOperation.computeIterations(valueCount, mem); assert valueCount == 0 || iterations > 0; nextBlocks = new byte[iterations * bulkOperation.byteBlockCount()]; nextValues = new LongsRef(new long[iterations * bulkOperation.byteValueCount()], 0, 0); nextValues.offset = nextValues.longs.length; position = -1; }
PackedReaderIterator(PackedInts.Format format, int packedIntsVersion, int valueCount, int bitsPerValue, DataInput in, int mem) { super(valueCount, bitsPerValue, in); this.format = format; this.packedIntsVersion = packedIntsVersion; bulkOperation = BulkOperation.of(format, bitsPerValue); iterations = iterations(mem); assert valueCount == 0 || iterations > 0; nextBlocks = new byte[iterations * bulkOperation.byteBlockCount()]; nextValues = new LongsRef(new long[iterations * bulkOperation.byteValueCount()], 0, 0); nextValues.offset = nextValues.longs.length; position = -1; }
PackedReaderIterator(PackedInts.Format format, int packedIntsVersion, int valueCount, int bitsPerValue, DataInput in, int mem) { super(valueCount, bitsPerValue, in); this.format = format; this.packedIntsVersion = packedIntsVersion; bulkOperation = BulkOperation.of(format, bitsPerValue); iterations = iterations(mem); assert valueCount == 0 || iterations > 0; nextBlocks = new byte[iterations * bulkOperation.byteBlockCount()]; nextValues = new LongsRef(new long[iterations * bulkOperation.byteValueCount()], 0, 0); nextValues.offset = nextValues.longs.length; position = -1; }