|
PSCF v1.4.0
|
Vertex iterator for graph associated with a polymer. More...
#include <VertexIterator.h>
Public Member Functions | |
| VertexIterator (PolymerSpecies< WT > const &polymer) | |
| Constructor. | |
| ~VertexIterator () | |
| Destructor. | |
| void | begin (int sourceId, int targetId) |
| Initialize iterator. | |
| VertexIterator & | operator++ () |
| Increment operator - move to next vertex. | |
| int | currentId () const |
| Get index of the current vertex. | |
| bool | isEnd () const |
| Return true iff currentId == targetId. | |
| bool | notEnd () const |
| Return true iff currentId != targetId. | |
Vertex iterator for graph associated with a polymer.
Usage: Suppose that object p is an instance of a subclass of PolymerSpecies<WT>. The following snippet illustrates how to iterate from vertex iSource to vertex iTarget of the associated polymer:
Definition at line 35 of file VertexIterator.h.
| Pscf::VertexIterator< WT >::VertexIterator | ( | PolymerSpecies< WT > const & | polymer | ) |
Constructor.
| polymer | associated PolymerSpecies object |
Definition at line 18 of file VertexIterator.tpp.
Referenced by operator++().
| Pscf::VertexIterator< WT >::~VertexIterator | ( | ) |
Destructor.
Definition at line 28 of file VertexIterator.tpp.
| void Pscf::VertexIterator< WT >::begin | ( | int | sourceId, |
| int | targetId ) |
Initialize iterator.
Definition at line 35 of file VertexIterator.tpp.
| VertexIterator< WT > & Pscf::VertexIterator< WT >::operator++ | ( | ) |
Increment operator - move to next vertex.
Definition at line 45 of file VertexIterator.tpp.
References notEnd(), UTIL_CHECK, Pscf::Edge::vertexId(), and VertexIterator().
| int Pscf::VertexIterator< WT >::currentId | ( | ) | const |
Get index of the current vertex.
Definition at line 68 of file VertexIterator.tpp.
| bool Pscf::VertexIterator< WT >::isEnd | ( | ) | const |
Return true iff currentId == targetId.
Definition at line 75 of file VertexIterator.tpp.
| bool Pscf::VertexIterator< WT >::notEnd | ( | ) | const |
Return true iff currentId != targetId.
Definition at line 84 of file VertexIterator.tpp.
Referenced by operator++().