|
||||||||||
| 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.CoordinateContinuous
public abstract class CoordinateContinuous
The base class for a location within a continuous space.
| Field Summary | |
|---|---|
protected double[] |
values
Each element of this array represents the position of this coordinate within a dimension, the index of the element. |
| Constructor Summary | |
|---|---|
CoordinateContinuous()
Creates a new discrete coordinate. |
|
CoordinateContinuous(double value)
Creates a new coordinate with the provided position. |
|
CoordinateContinuous(double[] values)
Creates a new coordinate with the provided dimensional positions. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Determines whether this coordinate is equal to another. |
int |
getDimensionCount()
Returns the number of dimensions this coordinate has. |
double |
getProduct()
Returns the product of all the dimension's values. |
double |
getValueAtDimension(int dimension)
Gets the value at the specified (1-based) dimension. |
double[] |
getValues()
Returns an array of position values for each dimension. |
void |
setValueAtDimension(int dimension,
double value)
Sets the value at the specified (1-based) dimension. |
void |
setValues(double[] values)
Sets the position values for this coordinate. |
java.lang.String |
toString()
Returns a string representing this coordinate. |
| Methods inherited from class org.ascape.model.space.Coordinate |
|---|
add, getDistance |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected double[] values
| Constructor Detail |
|---|
public CoordinateContinuous()
public CoordinateContinuous(double[] values)
values - the valuespublic CoordinateContinuous(double value)
value - the value| Method Detail |
|---|
public int getDimensionCount()
public final double[] getValues()
public final void setValues(double[] values)
values - the valuespublic final double getValueAtDimension(int dimension)
dimension - the dimension
public final void setValueAtDimension(int dimension,
double value)
dimension - the dimensionvalue - the valuepublic final double getProduct()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the obj
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||