public class InverseGraph<N> extends java.lang.Object implements DirectedGraph<N>
Modifier and Type | Field and Description |
---|---|
protected DirectedGraph<N> |
g |
Constructor and Description |
---|
InverseGraph(DirectedGraph<N> g) |
Modifier and Type | Method and Description |
---|---|
java.util.List<N> |
getHeads()
Returns a list of entry points for this graph.
|
java.util.List<N> |
getPredsOf(N s)
Returns a list of predecessors for the given node in the graph.
|
java.util.List<N> |
getSuccsOf(N s)
Returns a list of successors for the given node in the graph.
|
java.util.List<N> |
getTails()
Returns a list of exit points for this graph.
|
java.util.Iterator<N> |
iterator()
Returns an iterator for the nodes in this graph.
|
int |
size()
Returns the node count for this graph.
|
protected final DirectedGraph<N> g
public InverseGraph(DirectedGraph<N> g)
public java.util.List<N> getHeads()
getHeads
in interface DirectedGraph<N>
public java.util.List<N> getPredsOf(N s)
getPredsOf
in interface DirectedGraph<N>
public java.util.List<N> getSuccsOf(N s)
getSuccsOf
in interface DirectedGraph<N>
public java.util.List<N> getTails()
getTails
in interface DirectedGraph<N>
public java.util.Iterator<N> iterator()
iterator
in interface java.lang.Iterable<N>
iterator
in interface DirectedGraph<N>
public int size()
size
in interface DirectedGraph<N>