ucar.ma2
Class Index4D

java.lang.Object
  extended by ucar.ma2.Index
      extended by ucar.ma2.Index4D
All Implemented Interfaces:
java.lang.Cloneable

public class Index4D
extends Index

Specialization of Index for rank 4 arrays.

Version:
$Revision: 51 $ $Date: 2006-07-12 17:13:13Z $
Author:
caron
See Also:
Index

Constructor Summary
Index4D(int[] shape)
           
 
Method Summary
 java.lang.Object clone()
           
 int currentElement()
          Get the current element's index into the 1D backing array.
 int[] getCurrentCounter()
           
 Index set(int[] index)
          Set the current element's index.
 Index set(int v0, int v1, int v2, int v3)
          set current element at dimension 0,1,2,3 to v0,v1,v2,v3
 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
 void setDim(int dim, int value)
          set current element at dimension dim to v
 java.lang.String toString()
           
 
Methods inherited from class ucar.ma2.Index
computeSize, factory, getIndexName, getRank, getShape, getSize, set, set, set, set, set, set, set4, set5, set6, setIndexName, toStringDebug
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Index4D

public Index4D(int[] shape)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class Index

getCurrentCounter

public int[] getCurrentCounter()
Overrides:
getCurrentCounter in class Index

currentElement

public int currentElement()
Description copied from class: Index
Get the current element's index into the 1D backing array.

Overrides:
currentElement in class Index

setDim

public void setDim(int dim,
                   int value)
Description copied from class: Index
set current element at dimension dim to v

Overrides:
setDim in class Index

set0

public Index set0(int v)
Description copied from class: Index
set current element at dimension 0 to v

Overrides:
set0 in class Index
Returns:
this, so you can use A.get(i.set(i))

set1

public Index set1(int v)
Description copied from class: Index
set current element at dimension 1 to v

Overrides:
set1 in class Index
Returns:
this, so you can use A.get(i.set(i))

set2

public Index set2(int v)
Description copied from class: Index
set current element at dimension 2 to v

Overrides:
set2 in class Index
Returns:
this, so you can use A.get(i.set(i))

set3

public Index set3(int v)
Description copied from class: Index
set current element at dimension 3 to v

Overrides:
set3 in class Index
Returns:
this, so you can use A.get(i.set(i))

set

public Index set(int v0,
                 int v1,
                 int v2,
                 int v3)
Description copied from class: Index
set current element at dimension 0,1,2,3 to v0,v1,v2,v3

Overrides:
set in class Index
Returns:
this, so you can use A.get(i.set(i,j,k,l))

set

public Index set(int[] index)
Description copied from class: Index
Set the current element's index. General-rank case.

Overrides:
set in class Index
Returns:
this, so you can use A.get(i.set(i))

clone

public java.lang.Object clone()
Overrides:
clone in class Index