@Override public BytesRef apply(int i) { reader.getValue(from + i, scratchBytesRef1); return scratchBytesRef1; } };
@Override public void getValue(int i, BytesRef packedValue) { in.getValue(i, packedValue); }
@Override protected void setPivot(int i) { reader.getValue(i, pivot); pivotDoc = reader.getDocID(i); }
@Override protected int comparePivot(int j) { reader.getValue(j, scratch2); int cmp = FutureArrays.compareUnsigned(pivot.bytes, pivot.offset + offset, pivot.offset + offset + numBytesToCompare, scratch2.bytes, scratch2.offset + offset, scratch2.offset + offset + numBytesToCompare); if (cmp == 0) { cmp = pivotDoc - reader.getDocID(j); } return cmp; } }.sort(from, to);
Arrays.fill(maxPackedValue, (byte) 0); for (int i = 0; i < Math.toIntExact(pointCount); ++i) { values.getValue(i, scratchBytesRef1); for(int dim=0;dim<numIndexDims;dim++) { int offset = dim*bytesPerDim;
/** Sliced reference to points in an OfflineSorter.ByteSequencesWriter file. */ private static final class PathSlice { final PointWriter writer; final long start; final long count; public PathSlice(PointWriter writer, long start, long count) { this.writer = writer; this.start = start; this.count = count; } @Override public String toString() { return "PathSlice(start=" + start + " count=" + count + " writer=" + writer + ")"; } }
@Override public BytesRef apply(int i) { reader.getValue(from + i, scratchBytesRef1); return scratchBytesRef1; } };
@Override public BytesRef apply(int i) { reader.getValue(from + i, scratchBytesRef1); return scratchBytesRef1; } };
@Override public void getValue(int i, BytesRef packedValue) { in.getValue(i, packedValue); }
@Override protected void setPivot(int i) { reader.getValue(i, pivot); pivotDoc = reader.getDocID(i); }
@Override protected int comparePivot(int j) { reader.getValue(j, scratch2); int cmp = FutureArrays.compareUnsigned(pivot.bytes, pivot.offset + offset, pivot.offset + offset + numBytesToCompare, scratch2.bytes, scratch2.offset + offset, scratch2.offset + offset + numBytesToCompare); if (cmp == 0) { cmp = pivotDoc - reader.getDocID(j); } return cmp; } }.sort(from, to);
Arrays.fill(maxPackedValue, (byte) 0); for (int i = 0; i < Math.toIntExact(pointCount); ++i) { values.getValue(i, scratchBytesRef1); for(int dim=0;dim<numIndexDims;dim++) { int offset = dim*bytesPerDim;
Arrays.fill(maxPackedValue, (byte) 0); for (int i = 0; i < Math.toIntExact(pointCount); ++i) { values.getValue(i, scratchBytesRef1); for(int dim=0;dim<numIndexDims;dim++) { int offset = dim*bytesPerDim;
/** Sliced reference to points in an OfflineSorter.ByteSequencesWriter file. */ private static final class PathSlice { final PointWriter writer; final long start; final long count; public PathSlice(PointWriter writer, long start, long count) { this.writer = writer; this.start = start; this.count = count; } @Override public String toString() { return "PathSlice(start=" + start + " count=" + count + " writer=" + writer + ")"; } }
reader.getValue(from, scratchBytesRef1); for (int i = from + 1; i < to; ++i) { reader.getValue(i, scratchBytesRef2); for (int dim=0;dim<numDataDims;dim++) { final int offset = dim * bytesPerDim; reader.getValue(from, scratchBytesRef1); System.arraycopy(scratchBytesRef1.bytes, scratchBytesRef1.offset, scratch1, 0, packedBytesLength); reader.getValue(mid, scratchBytesRef1); System.arraycopy(scratchBytesRef1.bytes, scratchBytesRef1.offset + splitDim * bytesPerDim, splitPackedValues, address + 1, bytesPerDim);