PSCF v1.2
|
A junction or chain end in a block polymer. More...
#include <Vertex.h>
Public Member Functions | |
Vertex () | |
Constructor. | |
~Vertex () | |
Destructor. | |
void | setId (int id) |
Set the integer identifier of this vertex. | |
void | addEdge (Edge const &block) |
Add block to the list of attached blocks. | |
int | id () const |
Get the id of this vertex. | |
int | size () const |
Get the number of attached blocks. | |
Pair< int > const & | inPropagatorId (int i) const |
Get the block and direction of an incoming propagator. | |
Pair< int > const & | outPropagatorId (int i) const |
Get the block and direction of an outgoing propagator. | |
A junction or chain end in a block polymer.
A vertex represents a vertex within the graph associated with a linear or acyclic branched polymer. Each vertex is either a free end of a block or a junction at which two or more blocks (or edges) are connected.
Pscf::Vertex::Vertex | ( | ) |
Constructor.
Definition at line 18 of file Vertex.cpp.
Pscf::Vertex::~Vertex | ( | ) |
Destructor.
Definition at line 27 of file Vertex.cpp.
void Pscf::Vertex::setId | ( | int | id | ) |
Set the integer identifier of this vertex.
id | identifier |
Definition at line 34 of file Vertex.cpp.
References id().
void Pscf::Vertex::addEdge | ( | Edge const & | block | ) |
Add block to the list of attached blocks.
Preconditions: The id for this vertex must have been set, vertex ids must have been set for the block, and the id of this vertex must match one of the ids for the two vertices attached to the block.
block | attached Edge object |
Definition at line 40 of file Vertex.cpp.
References Pscf::Edge::id(), UTIL_THROW, and Pscf::Edge::vertexId().
|
inline |
|
inline |
Get the number of attached blocks.
Definition at line 110 of file Vertex.h.
Referenced by pscfpp.file.File::__eq__(), pscfpp.file.File::__init__(), pscfpp.text.Record::__init__(), pscfpp.file.File::__repr__(), pscfpp.text.Record::__str__(), Pscf::PolymerSpecies::isValid(), Pscf::PolymerSpecies::makePlan(), Pscf::PolymerTmpl< Block >::readParameters(), and Pscf::R1d::FieldIo::writeVertexQ().
|
inline |
Get the block and direction of an incoming propagator.
The first element of the integer pair is the block id, and the second is a direction id which is 0 if this vertex is vertex 1 of the block, and 1 if this vertex is vertex 0.
i | index of incoming propagator |
Definition at line 114 of file Vertex.h.
Referenced by Pscf::PolymerSpecies::isValid(), Pscf::PolymerSpecies::makePlan(), Pscf::PolymerTmpl< Block >::readParameters(), and Pscf::R1d::FieldIo::writeVertexQ().
|
inline |
Get the block and direction of an outgoing propagator.
The first element of the integer pair is the block id, and the second is a direction id which is 0 if this vertex is vertex 0 of the block, and 1 if this vertex is vertex 1.
i | index of incoming propagator |
Definition at line 118 of file Vertex.h.
Referenced by Pscf::PolymerSpecies::isValid().