helix.graph.algo
Class AbstractCCVisitor

java.lang.Object
  extended by helix.graph.algo.AbstractCCVisitor
All Implemented Interfaces:
Visitor
Direct Known Subclasses:
CCVisitor

public abstract class AbstractCCVisitor
extends Object
implements Visitor

a basic skeleton for a Visitor following the connected components (CC) of a graph note: you basically need to implement your own enter(), exit() and visit(Vertex v) methods enter() is called when entering a new CC exit() is called when finishing the current CC visit(v) is called when adding v into the current CC in addition you may override the accept(Edge edge) method to select proper edges (by default all existing edges are acceptable)


Constructor Summary
AbstractCCVisitor(Graph g)
           
 
Method Summary
 boolean accept(Edge e)
          default accept : accept any edge
 Visitor traverse()
          components traversal return this for piping
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface helix.graph.algo.Visitor
enter, exit, visit
 

Constructor Detail

AbstractCCVisitor

public AbstractCCVisitor(Graph g)
Method Detail

accept

public boolean accept(Edge e)
default accept : accept any edge

Specified by:
accept in interface Visitor

traverse

public Visitor traverse()
components traversal return this for piping

Specified by:
traverse in interface Visitor