Package org.jblas.ranges
Class IndicesRange
- java.lang.Object
-
- org.jblas.ranges.IndicesRange
-
-
Constructor Summary
Constructors Constructor Description IndicesRange(int[] is)
Initialize from integer array.IndicesRange(DoubleMatrix is)
Initialize from DoubleMatrix.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
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.int
value()
Get current index.
-
-
-
Constructor Detail
-
IndicesRange
public IndicesRange(int[] is)
Initialize from integer array.
-
IndicesRange
public IndicesRange(DoubleMatrix is)
Initialize from DoubleMatrix. Entries are converted to integers by truncation.
-
-
Method Detail
-
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.
-
next
public void next()
Description copied from interface:Range
Increase counter.
-
index
public int index()
Description copied from interface:Range
Consecutive numbering of current index.
-
value
public int value()
Description copied from interface:Range
Get current index.
-
-