All Packages Class Hierarchy This Package Previous Next Index
Class sdsu.algorithms.data.BoundedRangeGenarator
java.lang.Object
|
+----sdsu.algorithms.data.BoundedRangeGenarator
- public class BoundedRangeGenarator
- extends Object
- implements NumberGenerator
This class modifies sequence of numbers. It modifies the sequence so that
all numbers in the sequence are between a lower and upper bound. The lower bound
may be achieved, but the upper bound is not. That is all numbers will be in the range
[lowerBound, upperBound).
- Version:
- 1.0 18 June 1997
- Author:
- Roger Whitney (whitney@cs.sdsu.edu)
- See Also:
- NumberGenerator
-
BoundedRangeGenarator(double, double, NumberGenerator)
- Creates a generator that only produces numbers between
lowerBond and upperBound.
-
nextElement()
- Returns the next number in a sequence.
BoundedRangeGenarator
public BoundedRangeGenarator(double lowerBound,
double upperBound,
NumberGenerator aGenerator) throws IllegalArgumentException
- Creates a generator that only produces numbers between
lowerBond and upperBound.
- Throws: IllegalArgumentException
- if lowerBound > upperBound
nextElement
public final double nextElement()
- Returns the next number in a sequence.
The number will be in the interval [lowerBound, upperBound).
All Packages Class Hierarchy This Package Previous Next Index