|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.unh.sdb.common.SpaceID
edu.unh.sdb.datasource.IndexSpaceID
edu.unh.sdb.datasource.PackedIndexSpaceID
public class PackedIndexSpaceID
This class implements the IndexSpaceID class using a single integer to represent the dimensions of the ID. The leftmost 2 bits are used to represent the dimensionality, which can range from 1 to 4.
| Field Summary | |
|---|---|
protected int |
packedID
|
| Constructor Summary | |
|---|---|
PackedIndexSpaceID(IndexSpaceID id)
Constructs a PackedIndexSpaceID from the contents of the IndexSpaceID argument. |
|
PackedIndexSpaceID(int i)
Constructs a one dimensional PackedIndexSpaceID with axis value set to the argument. |
|
PackedIndexSpaceID(int[] axes)
Constructs a PackedIndexSpaceID with dimensionality matching the length of the parameter array. |
|
PackedIndexSpaceID(int i,
int j)
Constructs a two dimensional PackedIndexSpaceID with axis values set to the given values. |
|
PackedIndexSpaceID(int i,
int j,
int k)
Constructs a three dimensional PackedIndexSpaceID with axis values set to the given values. |
|
| Method Summary | |
|---|---|
void |
assign(PackedIndexSpaceID id)
Set the axes of this id to the axes of the parameter id. |
java.lang.Object |
clone()
Return a copy of this IndexSpaceID. |
IndexSpaceID |
copyID()
Return a copy of this IndexSpaceID. |
int |
dim()
Returns the dimensionality of this IndexSpaceID. |
int |
getCoord(int axisnumber)
Get the value corresponding to the specified axis. |
int[] |
getCoords(int[] coords)
Fill the array argument with the coordinate values for this ISID. |
static void |
main(java.lang.String[] args)
|
void |
setCoord(int axisnumber,
int value)
Set the specified axis to the specified value. |
java.lang.String |
toString()
Return a String representing the object. |
| Methods inherited from class edu.unh.sdb.datasource.IndexSpaceID |
|---|
add, add, containedBy, divide, equals, getCoords, greaterThanOrEqual, lessThanOrEqual, mod, multiply, negate, project, scale, scale, setDimensionsInUnits, shift, subtract, subtract, subtract, toString, volume |
| Methods inherited from class edu.unh.sdb.common.SpaceID |
|---|
setCoord |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int packedID
| Constructor Detail |
|---|
public PackedIndexSpaceID(int i)
public PackedIndexSpaceID(int i,
int j)
public PackedIndexSpaceID(int i,
int j,
int k)
public PackedIndexSpaceID(int[] axes)
public PackedIndexSpaceID(IndexSpaceID id)
| Method Detail |
|---|
public final IndexSpaceID copyID()
copyID in class IndexSpaceIDpublic java.lang.Object clone()
clone in class SpaceIDpublic final void assign(PackedIndexSpaceID id)
public int getCoord(int axisnumber)
getCoord in class IndexSpaceIDpublic int[] getCoords(int[] coords)
getCoords in class IndexSpaceID
public void setCoord(int axisnumber,
int value)
setCoord in class SpaceIDpublic int dim()
dim in class SpaceIDpublic java.lang.String toString()
toString in class IndexSpaceIDpublic static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||