Class HashedFloatVectors

java.lang.Object
io.nosqlbench.virtdata.lib.vectors.primitive.HashedFloatVectors
All Implemented Interfaces:
LongFunction<float[]>

public class HashedFloatVectors extends Object implements LongFunction<float[]>
Construct an arbitrarily large float vector with hashes. The initial value is assumed to be non-hashed, and is thus hashed on input to ensure that inputs are non-contiguous. Once the starting value is hashed, the sequence of long values is walked and each value added to the vector is hashed from the values in that sequence.
  • Constructor Details

    • HashedFloatVectors

      public HashedFloatVectors(Object sizer, Object valueFunc)
      Build a double[] generator with a given size value or size function, and the given long->double function.
      Parameters:
      sizer - Either a numeric type which sets a fixed dimension, or a long->int function to derive it uniquely for each input
      valueFunc - A long->double function
    • HashedFloatVectors

      public HashedFloatVectors(Object sizer, double min, double max)
    • HashedFloatVectors

      public HashedFloatVectors(Object sizer)
  • Method Details

    • apply

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