jdsl
Class FastSILGraph
java.lang.Object
|
+--jdsl.FastSILGraph
- public class FastSILGraph
- extends java.lang.Object
- implements Graph
This is the teach simplification/modification of the adv SILG.
|
Method Summary |
java.util.Iterator |
adjacentVertices(Vertex v)
|
int |
degree(Vertex v)
|
Vertex |
destination(Edge e)
|
java.util.Iterator |
directedEdges()
|
java.util.Iterator |
edges()
|
java.util.Iterator |
elements()
|
Vertex[] |
endVertices(Edge e)
|
java.util.Iterator |
inAdjacentVertices(Vertex v)
|
java.util.Iterator |
incidentEdges(Vertex v)
|
int |
inDegree(Vertex v)
|
java.util.Iterator |
inIncidentEdges(Vertex v)
|
Edge |
insertDirectedEdge(Vertex v1,
Vertex v2,
java.lang.Object elt)
|
Edge |
insertEdge(Vertex v1,
Vertex v2,
java.lang.Object elt)
|
Vertex |
insertVertex(java.lang.Object info)
____ _
/ ___|_ __ __ _ _ __ | |__
| | _| '__/ _` | '_ \| '_ \
| |_| | | | (_| | |_) | | | |
\____|_| \__,_| .__/|_| |_|
|_| |
boolean |
isDirected(Edge e)
|
boolean |
isEmpty()
|
void |
makeUndirected(Edge e)
|
Container |
newContainer()
____ _ _
/ ___|___ _ __ | |_ __ _(_)_ __ ___ _ __
| | / _ \| '_ \| __/ _` | | '_ \ / _ \ '__|
| |__| (_) | | | | || (_| | | | | | __/ |
\____\___/|_| |_|\__\__,_|_|_| |_|\___|_| |
int |
numEdges()
|
int |
numVertices()
___ _ _ _
|_ _|_ __ ___ _ __ ___ ___| |_ __ _| |__ | | ___
| || '_ \/ __| '_ \ / _ \/ __| __/ _` | '_ \| |/ _ \
| || | | \__ \ |_) | __/ (__| || (_| | |_) | | __/
|___|_| |_|___/ .__/ \___|\___|\__\__,_|_.__/|_|\___|
|_| |
Vertex |
opposite(Vertex v,
Edge e)
|
Vertex |
origin(Edge e)
|
java.util.Iterator |
outAdjacentVertices(Vertex v)
|
int |
outDegree(Vertex v)
|
java.util.Iterator |
outIncidentEdges(Vertex v)
|
java.util.Iterator |
positions()
PositionalContainer methods |
java.lang.Object |
removeEdge(Edge e)
|
java.lang.Object |
removeVertex(Vertex v)
|
java.lang.Object |
replace(Position p,
java.lang.Object newElement)
|
void |
reverseDirection(Edge e)
|
void |
setDirectionFrom(Edge e,
Vertex newOrigin)
|
void |
setDirectionTo(Edge e,
Vertex newDestination)
|
int |
size()
|
void |
swap(Position a,
Position b)
|
java.util.Iterator |
undirectedEdges()
|
java.util.Iterator |
vertices()
|
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
FastSILGraph
public FastSILGraph()
newContainer
public Container newContainer()
- ____ _ _
/ ___|___ _ __ | |_ __ _(_)_ __ ___ _ __
| | / _ \| '_ \| __/ _` | | '_ \ / _ \ '__|
| |__| (_) | | | | || (_| | | | | | __/ |
\____\___/|_| |_|\__\__,_|_|_| |_|\___|_|
size
public int size()
isEmpty
public boolean isEmpty()
elements
public java.util.Iterator elements()
positions
public java.util.Iterator positions()
- PositionalContainer methods
replace
public java.lang.Object replace(Position p,
java.lang.Object newElement)
throws InvalidPositionException
swap
public void swap(Position a,
Position b)
throws InvalidPositionException
numVertices
public int numVertices()
- ___ _ _ _
|_ _|_ __ ___ _ __ ___ ___| |_ __ _| |__ | | ___
| || '_ \/ __| '_ \ / _ \/ __| __/ _` | '_ \| |/ _ \
| || | | \__ \ |_) | __/ (__| || (_| | |_) | | __/
|___|_| |_|___/ .__/ \___|\___|\__\__,_|_.__/|_|\___|
|_|
numEdges
public int numEdges()
vertices
public java.util.Iterator vertices()
edges
public java.util.Iterator edges()
directedEdges
public java.util.Iterator directedEdges()
undirectedEdges
public java.util.Iterator undirectedEdges()
degree
public int degree(Vertex v)
inDegree
public int inDegree(Vertex v)
outDegree
public int outDegree(Vertex v)
adjacentVertices
public java.util.Iterator adjacentVertices(Vertex v)
throws InvalidPositionException
inAdjacentVertices
public java.util.Iterator inAdjacentVertices(Vertex v)
throws InvalidPositionException
outAdjacentVertices
public java.util.Iterator outAdjacentVertices(Vertex v)
throws InvalidPositionException
incidentEdges
public java.util.Iterator incidentEdges(Vertex v)
throws InvalidPositionException
inIncidentEdges
public java.util.Iterator inIncidentEdges(Vertex v)
throws InvalidPositionException
outIncidentEdges
public java.util.Iterator outIncidentEdges(Vertex v)
throws InvalidPositionException
endVertices
public Vertex[] endVertices(Edge e)
throws InvalidPositionException
opposite
public Vertex opposite(Vertex v,
Edge e)
throws InvalidEdgeException,
InvalidPositionException
origin
public Vertex origin(Edge e)
throws InvalidEdgeException,
InvalidPositionException
destination
public Vertex destination(Edge e)
throws InvalidEdgeException,
InvalidPositionException
isDirected
public boolean isDirected(Edge e)
throws InvalidEdgeException
insertVertex
public Vertex insertVertex(java.lang.Object info)
throws InvalidPositionException
- ____ _
/ ___|_ __ __ _ _ __ | |__
| | _| '__/ _` | '_ \| '_ \
| |_| | | | (_| | |_) | | | |
\____|_| \__,_| .__/|_| |_|
|_|
- Specified by:
- insertVertex in interface Graph
insertEdge
public Edge insertEdge(Vertex v1,
Vertex v2,
java.lang.Object elt)
throws InvalidPositionException
- Specified by:
- insertEdge in interface Graph
insertDirectedEdge
public Edge insertDirectedEdge(Vertex v1,
Vertex v2,
java.lang.Object elt)
throws InvalidPositionException
- Specified by:
- insertDirectedEdge in interface Graph
removeVertex
public java.lang.Object removeVertex(Vertex v)
throws InvalidPositionException
- Specified by:
- removeVertex in interface Graph
removeEdge
public java.lang.Object removeEdge(Edge e)
throws InvalidPositionException
- Specified by:
- removeEdge in interface Graph
setDirectionFrom
public void setDirectionFrom(Edge e,
Vertex newOrigin)
throws InvalidEdgeException,
InvalidPositionException
- Specified by:
- setDirectionFrom in interface Graph
setDirectionTo
public void setDirectionTo(Edge e,
Vertex newDestination)
throws InvalidEdgeException,
InvalidPositionException
- Specified by:
- setDirectionTo in interface Graph
makeUndirected
public void makeUndirected(Edge e)
throws InvalidEdgeException
- Specified by:
- makeUndirected in interface Graph
reverseDirection
public void reverseDirection(Edge e)
throws InvalidEdgeException,
InvalidPositionException
- Specified by:
- reverseDirection in interface Graph