|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmathcomp.gridgeom.Node
public class Node
A node consists of an x
and an y
coordinate.
Constructor Summary | |
---|---|
Node()
Creates an origo. |
|
Node(double x,
double y)
Creates an node at (x,y) |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
|
boolean |
equals(java.lang.Object o)
|
double |
getDistanceTo(Node k)
Calculates euclidian distance to k . |
double |
getX()
Returns the x. |
double |
getY()
Returns the y. |
int |
hashCode()
|
Node |
node(int i)
Returns the i -th node. |
int |
nodesCount()
Number of nodes. |
java.lang.String |
toString()
|
void |
update(double x,
double y)
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Node()
public Node(double x, double y)
(x,y)
x
- y
- Method Detail |
---|
public double getX()
public double getY()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public java.lang.String toString()
toString
in class java.lang.Object
public double getDistanceTo(Node k)
k
.
k
-
k
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public int nodesCount()
Geometric
nodesCount
in interface Geometric
public Node node(int i)
Geometric
i
-th node.
node
in interface Geometric
i
-th nodepublic void update(double x, double y)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |