soot.toolkits.graph
Class PseudoTopologicalOrderer

java.lang.Object
  extended bysoot.toolkits.graph.PseudoTopologicalOrderer
All Implemented Interfaces:
Orderer
Direct Known Subclasses:
ReversePseudoTopologicalOrderer

public class PseudoTopologicalOrderer
extends Object
implements Orderer

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 computeOrder(DirectedGraph g)
          Orders in pseudo-topological order.
 boolean isReverseOrder()
          Deprecated. use #newList(DirectedGraph, boolean)) instead
 List newList(DirectedGraph g)
          Deprecated. use #newList(DirectedGraph, boolean)) instead
 List newList(DirectedGraph 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.
 void setReverseOrder(boolean isReversed)
          Deprecated. use #newList(DirectedGraph, boolean)) instead
protected  void visitNode(Object 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 newList(DirectedGraph 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
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 computeOrder(DirectedGraph 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(Object startStmt)

newList

public List 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.


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.