Class DoubleVectors
- All Implemented Interfaces:
LongFunction<double[]>
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"
-
Constructor Summary
ConstructorsConstructorDescriptionDoubleVectors(String spec) Create a radix-mapped vector function based on a spec of character ranges and combinations. -
Method Summary
Methods inherited from class io.nosqlbench.virtdata.library.basics.shared.util.DoubleCombiner
apply, computeRadixFactors, getArray, getArray, getEncoding, getEncoding, getIndexes, getIndexes, getOrdinal, getOrdinal, maxRadixDigitsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.LongFunction
apply
-
Constructor Details
-
DoubleVectors
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
-