8#include "VertexIterator.h"
9#include <pscf/chem/PolymerSpecies.h>
10#include <pscf/chem/Edge.h>
17 template <
typename WT>
27 template <
typename WT>
34 template <
typename WT>
37 currentId_ = sourceId;
44 template <
typename WT>
48 Pair<int> propId = polymerPtr_->path(currentId_, targetId_);
49 int edgeId = propId[0];
50 int dirId = propId[1];
55 Edge const & edge = polymerPtr_->edge(edgeId);
67 template <
typename WT>
69 {
return currentId_; }
74 template <
typename WT>
77 return (
bool)( currentId_ == targetId_ );
83 template <
typename WT>
86 return (
bool)( currentId_ != targetId_ );
Descriptor for a block within a block polymer.
int vertexId(int i) const
Get the id of one associated vertex.
Descriptor for a linear or acyclic branched block polymer.
bool notEnd() const
Return true iff currentId != targetId.
int currentId() const
Get index of the current vertex.
VertexIterator & operator++()
Increment operator - move to next vertex.
bool isEnd() const
Return true iff currentId == targetId.
VertexIterator(PolymerSpecies< WT > const &polymer)
Constructor.
~VertexIterator()
Destructor.
void begin(int sourceId, int targetId)
Initialize iterator.
An array of exactly 2 objects.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
PSCF package top-level namespace.