Class IVecReader

java.lang.Object
io.nosqlbench.virtdata.library.ivecfvec.IVecReader
All Implemented Interfaces:
LongFunction<int[]>

public class IVecReader extends Object implements 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 Details

    • IVecReader

      public IVecReader(String pathname)
      Read the ivec file, determining the record size from the first record.
      Parameters:
      pathname - The location of the ivec file
    • IVecReader

      public IVecReader(String pathname, int expectedDimensions, int recordLimit)
  • Method Details

    • apply

      public int[] apply(long value)
      Specified by:
      apply in interface LongFunction<int[]>