Class TriangularStep
- All Implemented Interfaces:
LongUnaryOperator
Compute a value which increases monotonically with respect to the cycle value. All values for f(X+(m>=0)) will be equal or greater than f(X). In effect, this means that with a sequence of monotonic inputs, the results will be monotonic as well as clustered. The values will approximate input/average, but will vary in frequency around a simple binomial distribution.
The practical effect of this is to be able to compute a sequence of values over inputs which can act as foreign keys, but which are effectively ordered.
Call for Ideas
Due to the complexity of generalizing this as a pure function over other distributions, this is the only function of this type for now. If you are interested in this problem domain and have some suggestions for how to extend it to other distributions, please join the project or let us know.
-
Constructor Details
-
TriangularStep
public TriangularStep(long average, long variance)
-
-
Method Details
-
applyAsLong
public long applyAsLong(long operand) - Specified by:
applyAsLongin interfaceLongUnaryOperator
-
toString
-