|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jblas.la.ranges.IndicesRange
public class IndicesRange
Range which varies over pre-specified indices. For example,
int[] indices = new int[] { 1, 1, 2, 3, 5, 8, 13 }; Range r = new IndicesRange(indices);ranges over the first few Fibonacci numbers.
Constructor Summary | |
---|---|
IndicesRange(DoubleMatrix is)
Initialize from DoubleMatrix. |
|
IndicesRange(int[] is)
Initialize from integer array. |
Method Summary | |
---|---|
boolean |
hasMore()
More indices available? |
int |
index()
Consecutive numbering of current index. |
void |
init(int l,
int u)
Initialize Range to available indices |
int |
length()
Total number of indices. |
void |
next()
Increase counter. |
int |
value()
Get current index. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IndicesRange(int[] is)
public IndicesRange(DoubleMatrix is)
Method Detail |
---|
public void init(int l, int u)
Range
init
in interface Range
public int length()
Range
length
in interface Range
public void next()
Range
next
in interface Range
public int index()
Range
index
in interface Range
public int value()
Range
value
in interface Range
public boolean hasMore()
Range
hasMore
in interface Range
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |