graphlab.graph.graph
Class GraphPoint
java.lang.Object
java.awt.geom.Point2D
java.awt.geom.Point2D.Double
graphlab.graph.graph.GraphPoint
- All Implemented Interfaces:
- FromStringProvider, java.io.Serializable, java.lang.Cloneable
public class GraphPoint
- extends java.awt.geom.Point2D.Double
- implements java.io.Serializable, FromStringProvider
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class java.awt.geom.Point2D |
java.awt.geom.Point2D.Double, java.awt.geom.Point2D.Float |
Fields inherited from class java.awt.geom.Point2D.Double |
x, y |
Methods inherited from class java.awt.geom.Point2D.Double |
getX, getY, setLocation |
Methods inherited from class java.awt.geom.Point2D |
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
GraphPoint
public GraphPoint()
GraphPoint
public GraphPoint(GraphPoint p)
GraphPoint
public GraphPoint(double x,
double y)
multiply
public void multiply(double p)
- multiplies x and y by p (x=x*p, y=y*p)
- Parameters:
p
-
add
public void add(GraphPoint dp)
- adds this with dp (x=x+dp.x, y=y+dp.y)
- Parameters:
p
-
add
public GraphPoint add(double dx,
double dy)
- adds this with dp (x=x+dx.x, y=y+dy)
- Returns:
- this
toString
public java.lang.String toString()
- Overrides:
toString
in class java.awt.geom.Point2D.Double
distance
public double distance(GraphPoint pt)
fromString
public GraphPoint fromString(java.lang.String data)
- Specified by:
fromString
in interface FromStringProvider