helix.graph.algo
Class AbstractCCVisitor
java.lang.Object
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)
Method Summary |
boolean |
accept(Edge e)
default accept : accept any edge |
Visitor |
traverse()
components traversal
return this for piping |
AbstractCCVisitor
public AbstractCCVisitor(Graph g)
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