|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--edu.brook.ascape.model.Coordinate
|
+--edu.brook.ascape.model.CoordinateDiscrete
The base class for a location within a regular discrete space.
| Field Summary | |
protected int[] |
values
Each element of this array represents the position of this coordinate within a dimension, the index of the element. |
| Constructor Summary | |
CoordinateDiscrete()
Creates a new discrete coordinate. |
|
CoordinateDiscrete(int value)
Creates a new coordinate with the provided position. |
|
CoordinateDiscrete(int[] values)
Creates a new coordinate with the provided dimensional positions. |
|
| Method Summary | |
int |
getDimensionCount()
Returns the number of dimensions this coordinate has. |
int |
getProduct()
Returns the product of all the dimension's values. |
int |
getValueAtDimension(int dimension)
Gets the value at the specified (1-based) dimension. |
int[] |
getValues()
Returns an array of position values for each dimension. |
void |
setValueAtDimension(int dimension,
int value)
Sets the value at the specified (1-based) dimension. |
void |
setValues(int[] values)
Sets the position values for this coordinate. |
java.lang.String |
toString()
Returns a string representing this coordinate. |
| Methods inherited from class edu.brook.ascape.model.Coordinate |
getDistance |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected int[] values
| Constructor Detail |
public CoordinateDiscrete()
public CoordinateDiscrete(int[] values)
public CoordinateDiscrete(int value)
| Method Detail |
public int getDimensionCount()
public final int[] getValues()
public final void setValues(int[] values)
public final int getValueAtDimension(int dimension)
public final void setValueAtDimension(int dimension,
int value)
public final int getProduct()
public java.lang.String toString()
|
(c) 1998-2000 The Brookings Insitution Webpage |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||