GraphLab Project

graphlab.graph.graph
Class GraphPoint

java.lang.Object
  extended by java.awt.geom.Point2D
      extended by java.awt.geom.Point2D.Double
          extended by 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 Class Summary
 
Nested classes/interfaces inherited from class java.awt.geom.Point2D
java.awt.geom.Point2D.Double, java.awt.geom.Point2D.Float
 
Field Summary
 
Fields inherited from class java.awt.geom.Point2D.Double
x, y
 
Constructor Summary
GraphPoint()
           
GraphPoint(double x, double y)
           
GraphPoint(GraphPoint p)
           
 
Method Summary
 GraphPoint add(double dx, double dy)
          adds this with dp (x=x+dx.x, y=y+dy)
 void add(GraphPoint dp)
          adds this with dp (x=x+dp.x, y=y+dp.y)
 double distance(GraphPoint pt)
           
 GraphPoint fromString(java.lang.String data)
           
 void multiply(double p)
          multiplies x and y by p (x=x*p, y=y*p)
 java.lang.String toString()
           
 
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
 

Constructor Detail

GraphPoint

public GraphPoint()

GraphPoint

public GraphPoint(GraphPoint p)

GraphPoint

public GraphPoint(double x,
                  double y)
Method Detail

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

GraphLab Project