ca.quine.jcommons.transform.graph
Interface IDFSNodeApplicator

All Known Implementing Classes:
DFSNodeApplicatorAdapter, GACorrectorApplicator, GAFitnessCalculatorApplicator, GAFitnessMarkerApplicator, GAMarkerReaderApplicator, LinearizeApplicator, MarkAllUnnecessaryEdges, PrintApplicator

public interface IDFSNodeApplicator

See the following references for the original source that this file is based on.

apply(Map map, int traversal, INodeApplicator applicator)

apply(Node parentNode, Node node, int traversal, INodeApplicator applicator)


Field Summary
static int SEARCH_CONTINUE
          Continue applying nodes (possible return value of apply methods)
static int SEARCH_STOP
          Don't apply any more nodes (possible return value of apply methods)
static int SEARCH_TRIM
          Don't apply any nodes underneath the current node (possible return value of apply methods)
 
Method Summary
 int applyForwardEdge(TransformNode parentNode, TransformNode node)
          Apply the parent node and child node of every "forward edge" in DFS order; SEARCH_TRIM is not a valid return for this method.
 int applyPostOrder(TransformNode parentNode, TransformNode node)
          Apply the parent node and child node of every edge in post-order DFS order; SEARCH_TRIM is not a valid return for this method.
 int applyPreOrder(TransformNode parentNode, TransformNode node)
          Apply the parent node and child node of every edge in pre-order DFS order.
 

Field Detail

SEARCH_CONTINUE

public static final int SEARCH_CONTINUE
Continue applying nodes (possible return value of apply methods)

See Also:
Constant Field Values

SEARCH_TRIM

public static final int SEARCH_TRIM
Don't apply any nodes underneath the current node (possible return value of apply methods)

See Also:
Constant Field Values

SEARCH_STOP

public static final int SEARCH_STOP
Don't apply any more nodes (possible return value of apply methods)

See Also:
Constant Field Values
Method Detail

applyPreOrder

public int applyPreOrder(TransformNode parentNode,
                         TransformNode node)
Apply the parent node and child node of every edge in pre-order DFS order.

Parameters:
parentNode -
node -
Returns:
SEARCH_CONTINUE, SEARCH_STOP, or SEARCH_TRIM

applyPostOrder

public int applyPostOrder(TransformNode parentNode,
                          TransformNode node)
Apply the parent node and child node of every edge in post-order DFS order; SEARCH_TRIM is not a valid return for this method.

Parameters:
parentNode -
node -
Returns:
SEARCH_CONTINUE, SEARCH_STOP

applyForwardEdge

public int applyForwardEdge(TransformNode parentNode,
                            TransformNode node)
Apply the parent node and child node of every "forward edge" in DFS order; 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.

Parameters:
parentNode -
node -
Returns:
SEARCH_CONTINUE, SEARCH_STOP