8#include "VertexIterator.h"
9#include <pscf/chem/PolymerSpecies.h>
10#include <pscf/chem/Edge.h>
34 currentId_ = sourceId;
45 int edgeId = propId[0];
46 int dirId = propId[1];
51 Edge const & edge = polymerPtr_->
edge(edgeId);
64 {
return currentId_; }
71 return (
bool)( currentId_ == targetId_ );
79 return (
bool)( currentId_ != targetId_ );
Descriptor for a block within an acyclic block polymer.
int vertexId(int i) const
Get id of an associated vertex.
Descriptor for a linear or acyclic branched block polymer.
Pair< int > const & path(int is, int it) const
Get an id for a propagator from one vertex towards a target.
virtual Edge & edge(int id)=0
Get a specified Edge (block descriptor) by non-const reference.
Vertex iterator for graph associated with a polymer.
bool notEnd() const
Return true iff currentId != targetId.
VertexIterator & operator++()
Increment operator - move to next vertex.
~VertexIterator()
Destructor.
int currentId() const
Get index of the current vertex.
bool isEnd() const
Return true iff currentId == targetId.
void begin(int sourceId, int targetId)
Initialize iterator.
VertexIterator(PolymerSpecies const &polymer)
Constructor.
An array of exactly 2 objects.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
PSCF package top-level namespace.