mwalk Platform 0.3.0

mwalk.visitor
Class PrimaryPathVisitor

java.lang.Object
  |
  +--mwalk.visitor.AbstractVisitor
        |
        +--mwalk.visitor.PrimaryPathVisitor

public class PrimaryPathVisitor
extends AbstractVisitor
implements UpVisitor

A visitor used by the builder to mark the primary path for each receiver.

Version:
1.0
Author:
Robert Chalmers

Field Summary
protected  int edges
          A count of total egdes in graph
protected  int links
          A count of primary links in tree
 
Fields inherited from class mwalk.visitor.AbstractVisitor
CFG_BASE, eval, seen, verbose
 
Constructor Summary
PrimaryPathVisitor()
          Default constructor.
 
Method Summary
 int countEdges()
          Return the total number of edges in the graph.
 int countLinks()
          Return the number of primary links in the tree.
 TreeNode[] getParents(Tree tree, TreeNode node)
          Retrieve the list of parents of this node.
 
Methods inherited from class mwalk.visitor.AbstractVisitor
again, cfgBoolean, cfgInt, cfgString, cfgVisitor, evaluator, evaluator, getChildren, getReceivers, haveSeen, haveVisited, init, markSeen, markVisited, nextReceiver, postfix, prefix, reset, verbose, visitDown, visitDown, visitUp, visitUp, walkDown, walkUp
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

links

protected int links
A count of primary links in tree

edges

protected int edges
A count of total egdes in graph
Constructor Detail

PrimaryPathVisitor

public PrimaryPathVisitor()
Default constructor.
Method Detail

countLinks

public int countLinks()
Return the number of primary links in the tree.
Returns:
int number of primary links.

countEdges

public int countEdges()
Return the total number of edges in the graph.
Returns:
int number of edges.

getParents

public TreeNode[] getParents(Tree tree,
                             TreeNode node)
Retrieve the list of parents of this node.
Specified by:
getParents in interface UpVisitor
Overrides:
getParents in class AbstractVisitor
Parameters:
Tree - vistited tree
TreeNode - currently visited node
Returns:
TreeNode[] array of parent nodes of currently visited node

mwalk Platform 0.3.0

Submit a bug or feature mwalk Platform API Specification 0.3.0
Sensitivity: {Public:Research}
Copyright(c) 2000, Robert Chalmers