Package ucar.ma2
Class Index4D
- java.lang.Object
-
- ucar.ma2.Index
-
- ucar.ma2.Index4D
-
-
Constructor Summary
Constructors Constructor Description Index4D(int[] shape)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectclone()intcurrentElement()Get the current element's index into the 1D backing array.int[]getCurrentCounter()Get the current counter.intincr()Increment the current element by 1.protected voidprecalc()subclass specialization/optimization calculationsIndexset(int[] index)Set the current element's index.Indexset(int v0, int v1, int v2, int v3)set current element at dimension 0,1,2,3 to v0,v1,v2,v3Indexset0(int v)set current element at dimension 0 to vIndexset1(int v)set current element at dimension 1 to vIndexset2(int v)set current element at dimension 2 to vIndexset3(int v)set current element at dimension 3 to vvoidsetDim(int dim, int value)set current element at dimension dim to vStringtoString()
-
-
-
Method Detail
-
precalc
protected void precalc()
Description copied from class:Indexsubclass specialization/optimization calculations
-
getCurrentCounter
public int[] getCurrentCounter()
Description copied from class:IndexGet the current counter.- Overrides:
getCurrentCounterin classIndex- Returns:
- copy of the current counter.
-
currentElement
public int currentElement()
Description copied from class:IndexGet the current element's index into the 1D backing array. VLEN stops processing.- Overrides:
currentElementin classIndex- Returns:
- the current element's index into the 1D backing array.
-
incr
public int incr()
Description copied from class:IndexIncrement the current element by 1. Used by IndexIterator. General rank, with subclass specialization. Vlen skipped.
-
setDim
public void setDim(int dim, int value)Description copied from class:Indexset current element at dimension dim to v
-
set0
public Index set0(int v)
Description copied from class:Indexset current element at dimension 0 to v
-
set1
public Index set1(int v)
Description copied from class:Indexset current element at dimension 1 to v
-
set2
public Index set2(int v)
Description copied from class:Indexset current element at dimension 2 to v
-
set3
public Index set3(int v)
Description copied from class:Indexset current element at dimension 3 to v
-
set
public Index set(int v0, int v1, int v2, int v3)
Description copied from class:Indexset current element at dimension 0,1,2,3 to v0,v1,v2,v3
-
set
public Index set(int[] index)
Description copied from class:IndexSet the current element's index. General-rank case.
-
-