soot.toolkits.graph
Class PseudoTopologicalOrderer<N>

java.lang.Object
  extended by soot.toolkits.graph.PseudoTopologicalOrderer<N>
All Implemented Interfaces:
Orderer<N>
Direct Known Subclasses:
ReversePseudoTopologicalOrderer

public class PseudoTopologicalOrderer<N>
extends Object
implements Orderer<N>

Orders in pseudo-topological order, the nodes of a DirectedGraph instance.


Field Summary
static boolean REVERSE
           
 
Constructor Summary
PseudoTopologicalOrderer()
           
PseudoTopologicalOrderer(boolean isReversed)
          Deprecated. use PseudoTopologicalOrderer() instead
 
Method Summary
protected  List<N> computeOrder(DirectedGraph<N> g)
          Orders in pseudo-topological order.
 boolean isReverseOrder()
          Deprecated. use #newList(DirectedGraph, boolean)) instead
 List<N> newList(DirectedGraph g)
          Deprecated. use #newList(DirectedGraph, boolean)) instead
 List<N> newList(DirectedGraph<N> g, boolean reverse)
          Builds an order for a directed graph.
 void setReverseOrder(boolean isReversed)
          Deprecated. use #newList(DirectedGraph, boolean)) instead
protected  void visitNode(N startStmt)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVERSE

public static final boolean REVERSE
See Also:
Constant Field Values
Constructor Detail

PseudoTopologicalOrderer

public PseudoTopologicalOrderer()

PseudoTopologicalOrderer

public PseudoTopologicalOrderer(boolean isReversed)
Deprecated. use PseudoTopologicalOrderer() instead

Method Detail

newList

public List<N> newList(DirectedGraph<N> g,
                       boolean reverse)
Builds an order for a directed graph. The order is represented by the returned list, i.e. is a node was assigned number i in the order, it will be in the ith position of the returned list.

Specified by:
newList in interface Orderer<N>
Parameters:
g - a DirectedGraph instance whose nodes we wish to order
reverse - true to compute the reverse order
Returns:
a somehow ordered list of the graph's nodes

computeOrder

protected List<N> computeOrder(DirectedGraph<N> g)
Orders in pseudo-topological order.

Parameters:
g - a DirectedGraph instance we want to order the nodes for.
Returns:
an ordered list of the graph's nodes.

visitNode

protected void visitNode(N startStmt)

newList

public List<N> newList(DirectedGraph g)
Deprecated. use #newList(DirectedGraph, boolean)) instead

Parameters:
g - a DirectedGraph instance whose nodes we wish to order.
Returns:
a pseudo-topologically ordered list of the graph's nodes.

setReverseOrder

public void setReverseOrder(boolean isReversed)
Deprecated. use #newList(DirectedGraph, boolean)) instead

Set the ordering for the orderer.

Parameters:
isReverse - specify if we want reverse pseudo-topological ordering, or not.

isReverseOrder

public boolean isReverseOrder()
Deprecated. use #newList(DirectedGraph, boolean)) instead

Check the ordering for the orderer.

Returns:
true if we have reverse pseudo-topological ordering, false otherwise.