Package org.jblas.ranges
Class AllRange
java.lang.Object
org.jblas.ranges.AllRange
- All Implemented Interfaces:
Range
A range over all available indices. Can be used to address whole columns or rows. Like
the ":" index in matlab. Don't forget to call init() before using this range.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasMore()More indices available?intindex()Consecutive numbering of current index.voidinit(int l, int u) Initialize Range to available indicesintlength()Total number of indices.voidnext()Increase counter.toString()intvalue()Get current index.
-
Field Details
-
lower
private int lower -
upper
private int upper -
value
private int value -
counter
private int counter
-
-
Constructor Details
-
AllRange
public AllRange()
-
-
Method Details
-
init
public void init(int l, int u) Description copied from interface:RangeInitialize Range to available indices -
length
public int length()Description copied from interface:RangeTotal number of indices. -
value
public int value()Description copied from interface:RangeGet current index. -
index
public int index()Description copied from interface:RangeConsecutive numbering of current index. -
next
public void next()Description copied from interface:RangeIncrease counter. -
hasMore
public boolean hasMore()Description copied from interface:RangeMore indices available? -
toString
-