Class DoubleVectors

java.lang.Object
io.nosqlbench.virtdata.library.basics.shared.util.DoubleCombiner
io.nosqlbench.virtdata.lib.vectors.primitive.DoubleVectors
All Implemented Interfaces:
LongFunction<double[]>

public class DoubleVectors extends DoubleCombiner implements LongFunction<double[]>
This is a version of the NoSQLBench Combiner which is especially suited to constructing unique sequences of doubles. This can be to create arbitrarily long vectors in double[] form, where each vector corresponds to a specific character encoding. Based on the maximum cardinality of symbol values in each position, a step function on the unit interval is created for you and used as a source of magnitudes.

For example, with a combiner spec of "a-yA-Y*1024", the "a-yA-Y" part creates a character set mapping for 50 distinct indexed character values with the letter acting as a code, and then the "*1024" repeats ths mapping over 1024 digits of values, which are then concatenated into an array of values as a uniquely encoded vector. In actuality, the internal model is computed separately from the character encoding, so is efficient, although the character encoding can be used to uniquely identify each vector.

Note that as with other combiner forms, you can specify a different cardinality for each position, although the automatically computed step function for unit-interval will be based on the largest cardinality. It is not computed separately for each position. Thus, a specifier like "a-z*5;0-9*2"

will only see the last two positions using a fraction of the possible magnitudes, as the a-z element has the most steps at 26 between 0.0 and 1.0.
  • Constructor Details

    • DoubleVectors

      public DoubleVectors(String spec)
      Create a radix-mapped vector function based on a spec of character ranges and combinations.
      Parameters:
      spec - - The string specifier for a symbolic cardinality and symbol model that represents the vector values