N - Value type that the graph node stores.E - Value type that the graph edge stores.public abstract class DiGraph<N,E> extends Graph<N,E>
| Modifier and Type | Class and Description |
|---|---|
static interface |
DiGraph.DiGraphEdge<N,E>
A generic directed graph edge.
|
static interface |
DiGraph.DiGraphNode<N,E>
A generic directed graph node.
|
Graph.GraphEdge<N,E>| Constructor and Description |
|---|
DiGraph() |
| Modifier and Type | Method and Description |
|---|---|
abstract DiGraph.DiGraphNode<N,E> |
createNode(N nodeValue)
Gets a node from the graph given a value.
|
abstract void |
disconnectInDirection(N n1,
N n2)
Disconnects all edges from n1 to n2.
|
abstract java.util.List<? extends DiGraph.DiGraphNode<N,E>> |
getDirectedPredNodes(DiGraph.DiGraphNode<N,E> n) |
abstract java.util.List<? extends DiGraph.DiGraphNode<N,E>> |
getDirectedPredNodes(N nodeValue) |
abstract java.util.List<? extends DiGraph.DiGraphNode<N,E>> |
getDirectedSuccNodes(DiGraph.DiGraphNode<N,E> n) |
abstract java.util.List<? extends DiGraph.DiGraphNode<N,E>> |
getDirectedSuccNodes(N nodeValue) |
abstract java.util.List<? extends DiGraph.DiGraphEdge<N,E>> |
getEdges()
Gets an immutable list of all edges.
|
abstract java.util.List<? extends DiGraph.DiGraphEdge<N,E>> |
getEdges(N n1,
N n2)
Retrieves an edge from the graph.
|
abstract java.util.List<? extends DiGraph.DiGraphEdge<N,E>> |
getEdgesInDirection(N n1,
N n2) |
abstract java.util.List<? extends DiGraph.DiGraphEdge<N,E>> |
getInEdges(N nodeValue)
Gets an immutable list of in edges of the given node.
|
abstract DiGraph.DiGraphNode<N,E> |
getNode(N nodeValue)
Gets a node from the graph given a value.
|
abstract java.util.Collection<? extends DiGraph.DiGraphNode<N,E>> |
getNodes()
Gets an immutable list of all nodes.
|
abstract java.util.List<? extends DiGraph.DiGraphEdge<N,E>> |
getOutEdges(N nodeValue)
Gets an immutable list of out edges of the given node.
|
boolean |
isConnected(N n1,
E e,
N n2)
Checks whether two nodes in the graph are connected by the given
edge type.
|
boolean |
isConnected(N n1,
N n2)
Checks whether two nodes in the graph are connected.
|
abstract boolean |
isConnectedInDirection(N n1,
E edgeValue,
N n2)
Checks whether two nodes in the graph are connected via a directed edge
with the given value.
|
abstract boolean |
isConnectedInDirection(N n1,
N n2)
Checks whether two nodes in the graph are connected via a directed edge.
|
clearEdgeAnnotations, clearNodeAnnotations, connect, connectIfNotFound, disconnect, getFirstEdge, getNeighborNodes, getNodeCount, getNodeDegree, getWeight, hasNode, popEdgeAnnotations, popNodeAnnotations, pushEdgeAnnotations, pushNodeAnnotationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnewSubGraphpublic abstract DiGraph.DiGraphNode<N,E> createNode(N nodeValue)
GraphObject.equals.createNode in class Graph<N,E>nodeValue - The node's value.public abstract java.util.Collection<? extends DiGraph.DiGraphNode<N,E>> getNodes()
Graphpublic abstract DiGraph.DiGraphNode<N,E> getNode(N nodeValue)
AdjacencyGraphObject.equals.nodeValue - The node's value.public abstract java.util.List<? extends DiGraph.DiGraphEdge<N,E>> getEdges()
Graphpublic abstract java.util.List<? extends DiGraph.DiGraphEdge<N,E>> getEdges(N n1, N n2)
Graphpublic abstract java.util.List<? extends DiGraph.DiGraphEdge<N,E>> getEdgesInDirection(N n1, N n2)
public abstract java.util.List<? extends DiGraph.DiGraphEdge<N,E>> getOutEdges(N nodeValue)
public abstract java.util.List<? extends DiGraph.DiGraphEdge<N,E>> getInEdges(N nodeValue)
public abstract java.util.List<? extends DiGraph.DiGraphNode<N,E>> getDirectedPredNodes(DiGraph.DiGraphNode<N,E> n)
public abstract java.util.List<? extends DiGraph.DiGraphNode<N,E>> getDirectedPredNodes(N nodeValue)
public abstract java.util.List<? extends DiGraph.DiGraphNode<N,E>> getDirectedSuccNodes(DiGraph.DiGraphNode<N,E> n)
public abstract java.util.List<? extends DiGraph.DiGraphNode<N,E>> getDirectedSuccNodes(N nodeValue)
public abstract void disconnectInDirection(N n1, N n2)
n1 - Source node.n2 - Destination node.public abstract boolean isConnectedInDirection(N n1, N n2)
n1 - Node 1.n2 - Node 2.true if the graph contains edge from n1 to n2.public abstract boolean isConnectedInDirection(N n1, E edgeValue, N n2)
n1 - Node 1.edgeValue - edge value tagn2 - Node 2.true if the edge exists.public boolean isConnected(N n1, N n2)
GraphisConnected in class Graph<N,E>n1 - Node 1.n2 - Node 2.true if the two nodes are connected.Copyright © 2009-2020 Google. All Rights Reserved.