public class Odometer extends java.lang.Object implements java.util.Iterator<Index>
Modifier and Type | Class and Description |
---|---|
protected static class |
Odometer.STATE |
Modifier and Type | Field and Description |
---|---|
protected java.util.List<DapDimension> |
dimset |
protected long[] |
endpoint |
protected Index |
index |
protected boolean |
ismulti |
protected int |
rank |
protected java.util.List<Slice> |
slices |
protected Odometer.STATE |
state |
Constructor and Description |
---|
Odometer() |
Odometer(java.util.List<Slice> set) |
Odometer(java.util.List<Slice> set,
java.util.List<DapDimension> dimset) |
Modifier and Type | Method and Description |
---|---|
static Odometer |
factory(java.util.List<Slice> slices) |
static Odometer |
factory(java.util.List<Slice> slices,
java.util.List<DapDimension> dimset) |
static Odometer |
factoryScalar() |
java.util.List<Slice> |
getSlices() |
java.util.List<Odometer> |
getSubOdometers() |
boolean |
hasNext() |
long |
index()
Compute the linear index
from the current odometer indices.
|
Index |
indices()
Return current set of indices
|
boolean |
isMulti() |
Index |
next() |
int |
rank()
Return odometer rank
|
void |
remove() |
protected void |
reset() |
Slice |
slice(int i)
Return ith slice
|
int |
step(int firstpos,
int lastpos) |
java.lang.String |
toString() |
long |
totalSize()
Compute the total number of elements.
|
protected Odometer.STATE state
protected boolean ismulti
protected int rank
protected java.util.List<Slice> slices
protected java.util.List<DapDimension> dimset
protected Index index
protected long[] endpoint
public Odometer()
public Odometer(java.util.List<Slice> set) throws DapException
DapException
public Odometer(java.util.List<Slice> set, java.util.List<DapDimension> dimset) throws DapException
DapException
public static Odometer factoryScalar()
public static Odometer factory(java.util.List<Slice> slices) throws DapException
DapException
public static Odometer factory(java.util.List<Slice> slices, java.util.List<DapDimension> dimset) throws DapException
DapException
protected void reset()
public java.lang.String toString()
toString
in class java.lang.Object
public int rank()
public Slice slice(int i)
public java.util.List<Slice> getSlices()
public long index()
public Index indices()
public long totalSize()
public boolean hasNext()
hasNext
in interface java.util.Iterator<Index>
public void remove()
remove
in interface java.util.Iterator<Index>
public int step(int firstpos, int lastpos)
public java.util.List<Odometer> getSubOdometers()
public boolean isMulti()