|
The Octet Molecular Representation Framework v0.8.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Traverses an AtomGraph in breadth first order starting
from a client-defined root Atom. In a connected
AtomGraph, BreadthTraverser traverses
each Atom and AtomPair at least once.
Traversal proceeds via layers of Atoms that
are equidistant from the root Atom. Traversal events
follow the ordering:
layerStarted is called.
Atom is traversed (atomTraversed).
layerFinished is called
layerStarted is called. An AtomPair linking the root
Atom to one of its neighbors is traversed,
followed by the neighboring Atom. If the neighboring Atom
has already been traversed, only the AtomPair is traversed. Such a condition
indicates the presence of a cycle with an even number of Atoms.
AtomPairs connecting two Atoms in the current layer are
traversed.
Notification proceeds through Handler.crossAtomPairTraversed
and not Handler.atomPairTraversed.
Using BreadthTraverser consists of providing an AtomGraph
, a root Atom, and an implementation of the
BreadthTraverser.Handler interface to the traverse
method. The handler will be notified of various stages in the traversal.
| Nested Class Summary | |
static interface |
BreadthTraverser.Handler
An extension of the TraversalHandler interface that includes methods
specific to BreadthTraverser traversal. |
| Method Summary | |
void |
traverse(AtomGraph graph,
Atom root,
BreadthTraverser.Handler handler)
Traverses graph staring from root, while
notifying handler of traversal events. |
| Method Detail |
public void traverse(AtomGraph graph,
Atom root,
BreadthTraverser.Handler handler)
graph staring from root, while
notifying handler of traversal events.
graph - the AtomGraph to traverseroot - the root Atomhandler - receives traversal events
|
The Octet Molecular Representation Framework v0.8.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||