Package org.midheaven.math
Class RationalRandomGenerator
java.lang.Object
org.midheaven.math.RationalRandomGenerator
- All Implemented Interfaces:
IntervalRandomGenerator<Rational>,RandomGenerator<Rational>
Generator for Rational Random values.
-
Method Summary
Modifier and TypeMethodDescriptionprotected final Randombase()Performs base.Performs between.protected final intcheckBounds(Rational lowerBound, Rational upperBound) protected intPerforms compare.next()Performs next.protected RationalPerforms next.protected RationalPerforms next.Performs upTo.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.midheaven.math.RandomGenerator
generateNext, stream
-
Method Details
-
next
Performs next.- Parameters:
upperBound- the upperBound value- Returns:
- the result of next
-
next
Performs next.- Parameters:
lowerBound- the lowerBound valueupperBound- the upperBound value- Returns:
- the result of next
-
compare
Performs compare.- Parameters:
a- the a valueb- the b value- Returns:
- the result of compare
-
next
Performs next.- Returns:
- the result of next
-
upTo
Description copied from interface:IntervalRandomGeneratorPerforms upTo.- Specified by:
upToin interfaceIntervalRandomGenerator<T>- Parameters:
upperBound- the upperBound value- Returns:
- the result of upTo
-
between
Description copied from interface:IntervalRandomGeneratorPerforms between.- Specified by:
betweenin interfaceIntervalRandomGenerator<T>- Parameters:
lowerBound- the lowerBound valueupperBound- the upperBound value- Returns:
- the result of between
-
checkBounds
-
base
Performs base.- Returns:
- the result of base
-