|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ascape.model.space.Coordinate
org.ascape.model.space.CoordinateDiscrete
org.ascape.model.space.Coordinate1DDiscrete
public class Coordinate1DDiscrete
A location within a one-dimensional discrete space.
| Field Summary |
|---|
| Fields inherited from class org.ascape.model.space.CoordinateDiscrete |
|---|
values |
| Constructor Summary | |
|---|---|
Coordinate1DDiscrete()
Creates a 1-dimensional coordinate. |
|
Coordinate1DDiscrete(int value)
Creates a 1-dimensional coordinate with the specified position. |
|
Coordinate1DDiscrete(int[] values)
Creates a 1-dimensional coordinate with the specified postion values. |
|
| Method Summary | |
|---|---|
Coordinate |
add(Coordinate coordinate)
Adds the location of the supplied coordinate to this coordinate, returning the resulting coordinate. |
double |
getDistance(Coordinate coordinate)
Returns the distance between two coordinates. |
int |
getValue()
Returns the number of dimensions for this lattice. |
int |
getXValue()
Returns the x value of this coordinate. |
void |
setValue(int x)
Sets the value for this coordinate. |
void |
setXValue(int x)
Sets the y value for this coordinate. |
java.lang.String |
toString()
Returns a string representing this coordinate. |
| Methods inherited from class org.ascape.model.space.CoordinateDiscrete |
|---|
equals, getDimensionCount, getProduct, getValueAtDimension, getValues, hashCode, setValueAtDimension, setValues |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Coordinate1DDiscrete()
public Coordinate1DDiscrete(int[] values)
values - the valuespublic Coordinate1DDiscrete(int value)
value - the value| Method Detail |
|---|
public double getDistance(Coordinate coordinate)
getDistance in class Coordinatecoordinate - target to calcualte distance to
public final int getValue()
public final void setValue(int x)
x - the xpublic final int getXValue()
public final void setXValue(int x)
x - the xpublic Coordinate add(Coordinate coordinate)
add in class Coordinatecoordinate - the coordinate to sum with this one
public java.lang.String toString()
toString in class CoordinateDiscrete
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||