V
- vertex typeE
- edge typepublic class SparseDiGraph<V,E extends Arc<V>> extends SparseGraph<V,E> implements DiGraph<V,E>
Constructor and Description |
---|
SparseDiGraph()
Construct an empty graph.
|
SparseDiGraph(DiGraph<V,E> g)
(Copy) construct a graph from another graph.
|
Modifier and Type | Method and Description |
---|---|
Set<V> |
children(V v)
Gets the set of all children of this vertex.
|
Set<E> |
incomingArcs(V v)
Gets the set of all incoming arcs associated with a vertex in this graph.
|
Set<E> |
outgoingArcs(V v)
Gets the set of all outgoing arcs associated with a vertex in this graph.
|
Set<V> |
parents(V v)
Gets the set of all parents of this vertex.
|
String |
toString() |
SortedSet<V> |
vertices()
Gets the set of all vertices in this graph, sorted by the number of parents.
|
addEdge, addVertex, contains, edges, edges, removeEdge, removeVertex
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addEdge, addVertex, edges, edges, removeEdge, removeVertex
public Set<E> outgoingArcs(V v)
DiGraph
public Set<E> incomingArcs(V v)
DiGraph
public Set<V> parents(V v)
DiGraph
public Set<V> children(V v)
DiGraph
public SortedSet<V> vertices()
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.