Class HashedDoubleRange

  • All Implemented Interfaces:
    java.util.function.LongToDoubleFunction

    public class HashedDoubleRange
    extends java.lang.Object
    implements java.util.function.LongToDoubleFunction
    Return a double value within the specified range. This function uses an intermediate long to arrive at the sampled value before conversion to double, thus providing a more linear sample at the expense of some precision at extremely large values.
    • Constructor Summary

      Constructors 
      Constructor Description
      HashedDoubleRange​(double min, double max)  
    • Method Summary

      Modifier and Type Method Description
      double applyAsDouble​(long value)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HashedDoubleRange

        public HashedDoubleRange​(double min,
                                 double max)
    • Method Detail

      • applyAsDouble

        public double applyAsDouble​(long value)
        Specified by:
        applyAsDouble in interface java.util.function.LongToDoubleFunction