Package org.jblas.ranges
Class IntervalRange
java.lang.Object
org.jblas.ranges.IntervalRange
- All Implemented Interfaces:
Range
Range which varies from a given interval. Endpoint is exclusive!
"new IntervalRange(0, 3)" enumerates 0, 1, 2.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
hasMore()
More indices available?int
index()
Consecutive numbering of current index.void
init
(int lower, int upper) Initialize Range to available indicesint
length()
Total number of indices.void
next()
Increase counter.toString()
int
value()
Get current index.
-
Constructor Details
-
IntervalRange
Construct new interval range. Endpoints are inclusive.
-
-
Method Details
-
init
Description copied from interface:Range
Initialize Range to available indices -
length
Description copied from interface:Range
Total number of indices. -
next
Description copied from interface:Range
Increase counter. -
index
Description copied from interface:Range
Consecutive numbering of current index. -
value
Description copied from interface:Range
Get current index. -
hasMore
Description copied from interface:Range
More indices available? -
toString
-