Package squidpony.squidai.graph
Class DirectedGraph<V>
java.lang.Object
squidpony.squidai.graph.Graph<V>
squidpony.squidai.graph.DirectedGraph<V>
- Type Parameters:
V
- the vertex type; oftenCoord
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CostlyGraph
public class DirectedGraph<V> extends Graph<V> implements Serializable
A kind of
Graph
where all connections between vertices are one-way (but a connection may exist that goes from
A to B and another connection may go from B to A), and each connection can have a different cost.-
Field Summary
-
Constructor Summary
Constructors Constructor Description DirectedGraph()
DirectedGraph(Collection<V> vertices)
-
Method Summary
Modifier and Type Method Description DirectedGraphAlgorithms<V>
algorithms()
protected Graph<V>
createNew()
protected Connection<V>
obtainEdge()
Methods inherited from class squidpony.squidai.graph.Graph
addConnection, addConnection, addEdge, addEdge, addVertex, addVertices, connectionExists, contains, edgeExists, getEdge, getEdge, getEdgeCount, getEdges, getEdges, getNode, getNodes, getVertices, isDirected, removeAllEdges, removeAllVertices, removeConnection, removeEdge, removeEdge, removeNode, removeVertex, removeVertices, size, sortEdges, sortVertices
-
Constructor Details
-
DirectedGraph
public DirectedGraph() -
DirectedGraph
-
-
Method Details
-
obtainEdge
- Specified by:
obtainEdge
in classGraph<V>
-
createNew
-
algorithms
- Specified by:
algorithms
in classGraph<V>
-