public class Graph
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG |
Constructor and Description |
---|
Graph() |
Modifier and Type | Method and Description |
---|---|
void |
addEdge(Edge e) |
void |
addEdge(Vertex v1,
Vertex v2) |
Vertex |
addVertex(double x,
double y) |
Vertex |
addVertex(Point2D p) |
Graph |
clone() |
double |
distance(Edge e) |
double |
distance(Vertex v1,
Vertex v2) |
Point2D |
getInitPoint(Vertex v) |
java.util.LinkedList<Vertex> |
getNeighbors(Vertex v) |
Point2D |
getPoint(Vertex v) |
java.util.HashMap<Vertex,Point2D> |
getPoints() |
ccs.graph.EdgePos |
getPoints(Edge e) |
ccs.graph.EdgePos |
getPoints(Vertex v1,
Vertex v2) |
Vertex |
getRandomVertex() |
int |
getSize() |
Vertex |
getVertex(int i) |
Vertex |
getVertex(Point2D p,
double precision) |
Graph |
inducedSubgaph(java.util.ArrayList<Vertex> vset) |
double |
initDistance(Edge e) |
double |
initDistance(Vertex v1,
Vertex v2) |
void |
insertVertex(Vertex v,
double x,
double y) |
void |
insertVertex(Vertex v,
Point2D p) |
boolean |
isAdjacent(Edge edge) |
boolean |
isAdjacent(Vertex v1,
Vertex v2) |
int |
orientationOf(Vertex v1,
Vertex v2,
Vertex v) |
java.lang.String |
pointsToString() |
static Graph |
readFromStream(java.io.ObjectInputStream in) |
void |
removeEdge(Edge e) |
void |
removeEdge(Vertex v1,
Vertex v2) |
Vertex |
removeVertex(Vertex v) |
void |
resetInitPoints() |
void |
setInitPoint(Vertex v,
double x,
double y) |
void |
setInitPoint(Vertex v,
Point2D newloc) |
void |
setPoint(Vertex v,
double x,
double y) |
void |
setPoint(Vertex v,
Point2D newloc) |
void |
setPoints(Graph g) |
void |
setPoints(java.util.HashMap<Vertex,Point2D> map) |
java.lang.String |
toString() |
void |
transformVertex(Vertex v,
java.awt.geom.AffineTransform transform) |
void |
transformVertices(java.awt.geom.AffineTransform transform) |
void |
transformVertices(java.util.Collection<Vertex> list,
Cluster c,
Edge e,
ccs.graph.EdgePos newPos) |
void |
writeToStream(java.io.ObjectOutputStream o) |
public static final boolean DEBUG
public int getSize()
public ccs.graph.EdgePos getPoints(Edge e)
public void setPoint(Vertex v, double x, double y)
public void resetInitPoints()
public void setInitPoint(Vertex v, double x, double y)
public Vertex getRandomVertex()
public void insertVertex(Vertex v, double x, double y)
public Vertex addVertex(double x, double y)
public void addEdge(Edge e)
public void removeEdge(Edge e)
public boolean isAdjacent(Edge edge)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String pointsToString()
public Graph clone()
clone
in class java.lang.Object
public void setPoints(Graph g)
public Vertex getVertex(int i)
public double initDistance(Edge e)
public double distance(Edge e)
public void transformVertex(Vertex v, java.awt.geom.AffineTransform transform)
public void transformVertices(java.awt.geom.AffineTransform transform)
public void transformVertices(java.util.Collection<Vertex> list, Cluster c, Edge e, ccs.graph.EdgePos newPos)
public void writeToStream(java.io.ObjectOutputStream o) throws java.io.IOException
java.io.IOException
public static Graph readFromStream(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException