Class WeightedLongs

java.lang.Object
io.nosqlbench.virtdata.library.basics.shared.from_long.to_long.WeightedLongs
All Implemented Interfaces:
LongFunction<Long>

public class WeightedLongs extends Object implements LongFunction<Long>
Provides a long value from a list of weighted values. The total likelihood of any value to be produced is proportional to its relative weight in the total weight of all elements. This function automatically hashes the input, so the result is already pseudo-random.
  • Constructor Details

    • WeightedLongs

      public WeightedLongs(String valuesAndWeights)
  • Method Details