public class Index extends Object
| Modifier and Type | Method and Description |
|---|---|
int[] |
getCurrentIndex()
Get the current index as int[] .
|
Index |
incr(int dim)
Increment the ith dimension.
|
static Index |
of(int[] index) |
static Index |
ofRank(int rank) |
Index |
set(int... index)
Set the current element's index.
|
Index |
set0(int v)
set current element at dimension 0 to v
|
Index |
set1(int v)
set current element at dimension 1 to v
|
Index |
set2(int v)
set current element at dimension 2 to v
|
Index |
set3(int v)
set current element at dimension 3 to v
|
Index |
set4(int v)
set current element at dimension 4 to v
|
Index |
set5(int v)
set current element at dimension 5 to v
|
Index |
set6(int v)
set current element at dimension 6 to v
|
Index |
setDim(int dim,
int value)
Set current element at dimension dim
|
Index |
setElem(long elem)
Set the current multidim index using 1-d element index.
|
public Index(Index from)
public static Index ofRank(int rank)
public static Index of(int[] index)
public Index incr(int dim)
dim - which dimensionpublic int[] getCurrentIndex()
public Index setElem(long elem)
public Index setDim(int dim, int value)
dim - set this dimensionvalue - to this valuepublic Index set0(int v)
public Index set1(int v)
public Index set2(int v)
public Index set3(int v)
public Index set4(int v)
public Index set5(int v)
public Index set6(int v)
public Index set(int... index)
index - set current value to these values, number of values must be equal to the rank.ArrayIndexOutOfBoundsException - if index.length != rank.