Class Shuffle

java.lang.Object
io.nosqlbench.virtdata.library.basics.core.lfsrs.MetaShift.Func
io.nosqlbench.virtdata.library.basics.shared.from_long.to_long.Shuffle
All Implemented Interfaces:
java.util.function.LongUnaryOperator

public class Shuffle
extends MetaShift.Func
This function provides a low-overhead shuffling effect without loading elements into memory. It uses a bundled dataset of pre-computed Galois LFSR shift register configurations, along with a down-sampling method to provide amortized virtual shuffling with minimal memory usage. Essentially, this guarantees that every value in the specified range will be seen at least once before the cycle repeats. However, since the order of traversal of these values is dependent on the LFSR configuration, some orders will appear much more random than others depending on where you are in the traversal cycle. This function *does* yield values that are deterministic.
  • Field Summary

    Fields inherited from class io.nosqlbench.virtdata.library.basics.core.lfsrs.MetaShift.Func

    config, feedback, periodModulo
  • Constructor Summary

    Constructors 
    Constructor Description
    Shuffle​(long min, long maxPlusOne)  
    Shuffle​(long min, long maxPlusOne, int bankSelector)  
  • Method Summary

    Modifier and Type Method Description
    long applyAsLong​(long register)  

    Methods inherited from class io.nosqlbench.virtdata.library.basics.core.lfsrs.MetaShift.Func

    toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.util.function.LongUnaryOperator

    andThen, compose
  • Constructor Details

    • Shuffle

      public Shuffle​(long min, long maxPlusOne)
    • Shuffle

      public Shuffle​(long min, long maxPlusOne, int bankSelector)
  • Method Details

    • applyAsLong

      public long applyAsLong​(long register)
      Specified by:
      applyAsLong in interface java.util.function.LongUnaryOperator
      Overrides:
      applyAsLong in class MetaShift.Func