public class D4Index extends Index
Constructor and Description |
---|
D4Index(D4Index index) |
D4Index(int rank) |
D4Index(int[] _shape) |
D4Index(int[] indices,
int[] dimsizes) |
Modifier and Type | Method and Description |
---|---|
int |
getCurrentCounter(int i) |
int |
index()
Compute the linear index
from the current odometer indices.
|
static java.util.List<Slice> |
indexToSlices(Index indices)
Convert ucar.ma2.Index to list of slices
|
boolean |
isScalar() |
static Index |
offsetToIndex(int offset,
int[] shape)
Given an offset (single index) and a set of dimensions
compute the set of dimension indices that correspond
to the offset.
|
static D4Index |
slicesToIndex(java.util.List<Slice> slices)
If a set of slices refers to a single position,
then return the corresponding Index.
|
java.lang.String |
toString() |
public static final D4Index SCALAR
public D4Index(int rank)
public D4Index(int[] _shape)
public D4Index(D4Index index)
public D4Index(int[] indices, int[] dimsizes)
public static Index offsetToIndex(int offset, int[] shape)
public static java.util.List<Slice> indexToSlices(Index indices) throws DapException
indices
- to convertDapException
public static D4Index slicesToIndex(java.util.List<Slice> slices) throws DapException
slices
- DapException
public int index()
public int getCurrentCounter(int i)
public boolean isScalar()