Class TriangleWave
java.lang.Object
io.nosqlbench.virtdata.library.basics.shared.from_long.to_long.TriangleWave
- All Implemented Interfaces:
LongUnaryOperator
Computes the distance between the current input value and the
beginning of the phase, according to a phase length.
This means that for a phase length of 100, the values will
range from 0 (for cycle values 0 and 100 or any multiple thereof)
and 50, when the cycle value falls immediately at the middle
of the phase.
-
Constructor Summary
ConstructorsConstructorDescriptionTriangleWave(long phaseLength) TriangleWave(long phaseLength, Object scaleFunc) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.LongUnaryOperator
andThen, compose
-
Constructor Details
-
TriangleWave
-
TriangleWave
public TriangleWave(long phaseLength)
-
-
Method Details
-
applyAsLong
public long applyAsLong(long operand) - Specified by:
applyAsLongin interfaceLongUnaryOperator
-