Package soot.toolkits.graph
Class InverseGraph<N>
- java.lang.Object
-
- soot.toolkits.graph.InverseGraph<N>
-
- Type Parameters:
N-
- All Implemented Interfaces:
Iterable<N>,DirectedGraph<N>
public class InverseGraph<N> extends Object implements DirectedGraph<N>
An inverted graph of a directed graph.- Author:
- Eric Bodden
-
-
Field Summary
Fields Modifier and Type Field Description protected DirectedGraph<N>g
-
Constructor Summary
Constructors Constructor Description InverseGraph(DirectedGraph<N> g)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<N>getHeads()Returns a list of entry points for this graph.List<N>getPredsOf(N s)Returns a list of predecessors for the given node in the graph.List<N>getSuccsOf(N s)Returns a list of successors for the given node in the graph.List<N>getTails()Returns a list of exit points for this graph.Iterator<N>iterator()Returns an iterator for the nodes in this graph.intsize()Returns the node count for this graph.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
g
protected final DirectedGraph<N> g
-
-
Constructor Detail
-
InverseGraph
public InverseGraph(DirectedGraph<N> g)
-
-
Method Detail
-
getHeads
public List<N> getHeads()
Returns a list of entry points for this graph.- Specified by:
getHeadsin interfaceDirectedGraph<N>
-
getPredsOf
public List<N> getPredsOf(N s)
Returns a list of predecessors for the given node in the graph.- Specified by:
getPredsOfin interfaceDirectedGraph<N>
-
getSuccsOf
public List<N> getSuccsOf(N s)
Returns a list of successors for the given node in the graph.- Specified by:
getSuccsOfin interfaceDirectedGraph<N>
-
getTails
public List<N> getTails()
Returns a list of exit points for this graph.- Specified by:
getTailsin interfaceDirectedGraph<N>
-
iterator
public Iterator<N> iterator()
Returns an iterator for the nodes in this graph. No specific ordering of the nodes is guaranteed.
-
size
public int size()
Returns the node count for this graph.- Specified by:
sizein interfaceDirectedGraph<N>
-
-