Package org.jblas.ranges
Class PointRange
java.lang.Object
org.jblas.ranges.PointRange
- All Implemented Interfaces:
Range
A PointRange is a range which only has a single point.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
hasMore()
More indices available?int
index()
Consecutive numbering of current index.void
init
(int l, int u) Initialize Range to available indicesint
length()
Total number of indices.void
next()
Increase counter.toString()
int
value()
Get current index.
-
Field Details
-
value
private int value -
consumed
private boolean consumed
-
-
Constructor Details
-
PointRange
public PointRange(int v) Construct a new PointRange with the one given index.
-
-
Method Details
-
init
public void init(int l, int u) Description copied from interface:Range
Initialize Range to available indices -
length
public int length()Description copied from interface:Range
Total number of indices. -
value
public int value()Description copied from interface:Range
Get current index. -
index
public int index()Description copied from interface:Range
Consecutive numbering of current index. -
next
public void next()Description copied from interface:Range
Increase counter. -
hasMore
public boolean hasMore()Description copied from interface:Range
More indices available? -
toString
-