ca.quine.jcommons.transform.appl
Class LinearizeApplicator
java.lang.Object
|
+--ca.quine.jcommons.transform.appl.LinearizeApplicator
- All Implemented Interfaces:
- IDFSNodeApplicator
- Direct Known Subclasses:
- LinearizeAndPruneApplicator
- public class LinearizeApplicator
- extends Object
- implements IDFSNodeApplicator
Used with a DFS to produce a List of nodes in DFS order.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LinearizeApplicator
public LinearizeApplicator()
applyPreOrder
public int applyPreOrder(TransformNode parentNode,
TransformNode node)
- Description copied from interface:
IDFSNodeApplicator
- Apply the parent node and child node of every edge in pre-order DFS
order.
- Specified by:
applyPreOrder
in interface IDFSNodeApplicator
- Parameters:
parentNode
- node
-
- Returns:
IDFSNodeApplicator.SEARCH_CONTINUE
, IDFSNodeApplicator.SEARCH_STOP
, or
IDFSNodeApplicator.SEARCH_TRIM
applyPostOrder
public int applyPostOrder(TransformNode parentNode,
TransformNode node)
- Description copied from interface:
IDFSNodeApplicator
- Apply the parent node and child node of every edge in post-order DFS
order;
IDFSNodeApplicator.SEARCH_TRIM
is not a valid return for this method.
- Specified by:
applyPostOrder
in interface IDFSNodeApplicator
- Parameters:
parentNode
- node
-
- Returns:
IDFSNodeApplicator.SEARCH_CONTINUE
, IDFSNodeApplicator.SEARCH_STOP
applyForwardEdge
public int applyForwardEdge(TransformNode parentNode,
TransformNode node)
- Description copied from interface:
IDFSNodeApplicator
- Apply the parent node and child node of every "forward edge" in DFS
order;
IDFSNodeApplicator.SEARCH_TRIM
is not a valid return for this method.
For more information on forward edges, please consult
"Introduction to Algorithms", Cormen, Leiserson, and Rivest, 1990.
- Specified by:
applyForwardEdge
in interface IDFSNodeApplicator
- Parameters:
parentNode
- node
-
- Returns:
IDFSNodeApplicator.SEARCH_CONTINUE
, IDFSNodeApplicator.SEARCH_STOP
getNodeList
public List getNodeList()