All Packages Class Hierarchy This Package Previous Next Index
Class sdsu.algorithms.data.ShiftedRangeGenarator
java.lang.Object
|
+----sdsu.algorithms.data.ShiftedRangeGenarator
- public class ShiftedRangeGenarator
- extends Object
- implements NumberGenerator
This class modifies a sequence of numbers. Given a number generator this
generator shifts all numbers of the generator by a fixed value.
- Version:
- 1.0 18 June 1997
- Author:
- Roger Whitney (whitney@cs.sdsu.edu)
- See Also:
- NumberGenerator
-
ShiftedRangeGenarator(double, NumberGenerator)
- Creates a generator that shifts the range of its generator.
-
nextElement()
- Returns the next number in a sequence.
ShiftedRangeGenarator
public ShiftedRangeGenarator(double shift,
NumberGenerator aGenerator)
- Creates a generator that shifts the range of its generator.
- Parameters:
- shift - the amount to translate the range aGenerator.
nextElement
public final double nextElement()
- Returns the next number in a sequence.
The number will be between the lower and upper bound of this generator.
All Packages Class Hierarchy This Package Previous Next Index