Class IVecReader
java.lang.Object
io.nosqlbench.virtdata.library.ivecfvec.IVecReader
- All Implemented Interfaces:
LongFunction<int[]>
Reads ivec files with random access, using the input to specify the record number.
This is used for testing with generated KNN test data which is uniform in dimensions and neighborhood size.
While it is possible to specify different dimensioned vectors per record, this is not supported, since this
function honors the pure-function behavior of other NB binding functions. This requires uniform record structure for random access.
-
Constructor Summary
ConstructorsConstructorDescriptionIVecReader(String pathname) Read the ivec file, determining the record size from the first record.IVecReader(String pathname, int expectedDimensions, int recordLimit) -
Method Summary
-
Constructor Details
-
IVecReader
Read the ivec file, determining the record size from the first record.- Parameters:
pathname- The location of the ivec file
-
IVecReader
-
-
Method Details
-
apply
public int[] apply(long value) - Specified by:
applyin interfaceLongFunction<int[]>
-