Package org.apache.commons.math3.util
Class IntegerSequence.Range
java.lang.Object
org.apache.commons.math3.util.IntegerSequence.Range
- Enclosing class:
IntegerSequence
Generates a sequence of integers.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRange
(int start, int max, int step) Creates a sequence \( a_i, i invalid input: '<' 0 invalid input: '<'= n \) where \( a_i = start + i * step \) and \( n \) is such that \( a_n invalid input: '<'= max \) and \( a_{n+1} > max \). -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
size
private final int sizeNumber of integers contained in this range. -
start
private final int startFirst value. -
max
private final int maxFinal value. -
step
private final int stepIncrement.
-
-
Constructor Details
-
Range
public Range(int start, int max, int step) Creates a sequence \( a_i, i invalid input: '<' 0 invalid input: '<'= n \) where \( a_i = start + i * step \) and \( n \) is such that \( a_n invalid input: '<'= max \) and \( a_{n+1} > max \).- Parameters:
start
- First value of the range.max
- Last value of the range that satisfies the above construction rule.step
- Increment.
-
-
Method Details