org.jikesrvm.compilers.opt.util
Class ReverseDFSenumerateByFinish
java.lang.Object
org.jikesrvm.compilers.opt.util.Stack<GraphNode>
org.jikesrvm.compilers.opt.util.DFSenumerateByFinish
org.jikesrvm.compilers.opt.util.ReverseDFSenumerateByFinish
- All Implemented Interfaces:
- Iterable<GraphNode>, Enumeration<GraphNode>
- Direct Known Subclasses:
- ReverseFilteredDFSenumerateByFinish
public class ReverseDFSenumerateByFinish
- extends DFSenumerateByFinish
This class generates an enumeration of nodes of a graph, in order
of increasing finishing time in a reverse Depth First Search,
i.e. a search traversing nodes from target to source.
Methods inherited from class org.jikesrvm.compilers.opt.util.Stack |
compare, copy, empty, getTOS, isEmpty, iterator, peek, pop, push, shallowCopy, toString |
ReverseDFSenumerateByFinish
public ReverseDFSenumerateByFinish(Graph net)
- Construct a reverse DFS across a graph.
- Parameters:
net
- The graph over which to search.
ReverseDFSenumerateByFinish
public ReverseDFSenumerateByFinish(Graph net,
Enumeration<GraphNode> nodes)
- Construct a reverse DFS across a subset of a graph, starting
at the given set of nodes.
- Parameters:
net
- The graph over which to searchnodes
- The nodes at which to start the search
getConnected
protected Enumeration<GraphNode> getConnected(GraphNode n)
- Traverse edges from target to source.
- Overrides:
getConnected
in class DFSenumerateByFinish
- Parameters:
n
- A node in the DFS
- Returns:
- The nodes that have edges leading to n