|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
An interface describing a graph as a combinatorial object. Holds both directed and undirected edges. Note that the Vertex and Edge interfaces are subinterfaces of jdsl.core.api.Position -- empty subinterfaces, for type safety only.
| Method Summary | |
Edge |
insertDirectedEdge(Vertex u,
Vertex v,
java.lang.Object info)
Inserts a new directed edge from an existing vertex to another. |
Edge |
insertEdge(Vertex u,
Vertex v,
java.lang.Object info)
Inserts a new undirected edge between two existing vertices. |
Vertex |
insertVertex(java.lang.Object info)
Inserts a new isolated vertex containing an object. |
void |
makeUndirected(Edge e)
Makes a directed edge undirected. |
java.lang.Object |
removeEdge(Edge e)
Removes an edge. |
java.lang.Object |
removeVertex(Vertex v)
Deletes a vertex and all its incident edges. |
void |
reverseDirection(Edge e)
Reverse the direction of an edge. |
void |
setDirectionFrom(Edge e,
Vertex newOrigin)
Sets the direction of an edge away from a vertex. |
void |
setDirectionTo(Edge e,
Vertex newDestination)
Sets the direction of an edge towards a vertex. |
| Methods inherited from interface jdsl.core.api.InspectableGraph |
adjacentVertices,
degree,
destination,
directedEdges,
edges,
endVertices,
inAdjacentVertices,
incidentEdges,
inDegree,
inIncidentEdges,
isDirected,
numEdges,
numVertices,
opposite,
origin,
outAdjacentVertices,
outDegree,
outIncidentEdges,
undirectedEdges,
vertices |
| Methods inherited from interface jdsl.core.api.PositionalContainer |
positions,
replace,
swap |
| Methods inherited from interface jdsl.core.api.Container |
elements,
newContainer |
| Methods inherited from interface jdsl.simple.api.SimpleContainer |
isEmpty,
size |
| Method Detail |
public Vertex insertVertex(java.lang.Object info)
throws InvalidPositionException
info - the object to be stored in the new vertex
public Edge insertEdge(Vertex u,
Vertex v,
java.lang.Object info)
throws InvalidPositionException
u - the first endvertexv - the second endvertex
public Edge insertDirectedEdge(Vertex u,
Vertex v,
java.lang.Object info)
throws InvalidPositionException
u - the origin vertexv - the destination vertex
public java.lang.Object removeVertex(Vertex v)
throws InvalidPositionException
v - the vertex to be deleted
public java.lang.Object removeEdge(Edge e)
throws InvalidPositionException
e - the edge to be removed
public void setDirectionFrom(Edge e,
Vertex newOrigin)
throws InvalidEdgeException,
InvalidPositionException
e - an edgev - an endvertex of e
public void setDirectionTo(Edge e,
Vertex newDestination)
throws InvalidEdgeException,
InvalidPositionException
e - an edgev - an endvertex of e
public void makeUndirected(Edge e)
throws InvalidEdgeException
e - an edge
public void reverseDirection(Edge e)
throws InvalidEdgeException,
InvalidPositionException
e - an edge
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||