Class HdfFileToFloatArray

java.lang.Object
io.nosqlbench.virtdata.library.hdf5.from_long.AbstractHdfFileToVectorType
io.nosqlbench.virtdata.library.hdf5.from_long.to_array.HdfFileToFloatArray
All Implemented Interfaces:
LongFunction<float[]>

public class HdfFileToFloatArray extends AbstractHdfFileToVectorType implements LongFunction<float[]>
This function reads a vector dataset from an HDF5 file. The dataset itself is not read into memory, only the metadata (the "dataset" Java Object). The lambda function reads a single vector from the dataset, based on the long input value. As currently written this class will only work for datasets with 2 dimensions where the 1st dimension specifies the number of vectors and the 2nd dimension specifies the number of elements in each vector. Only datatypes short, int, and float are supported at this time.

This implementation is specific to returning an array of floats

  • Constructor Details

    • HdfFileToFloatArray

      public HdfFileToFloatArray(String filename, String datasetName)
  • Method Details

    • apply

      public float[] apply(long l)
      Specified by:
      apply in interface LongFunction<float[]>