11#include "PolymerType.h"
12#include <util/containers/Pair.h>
69 template <
class Archive>
70 void serialize(Archive& ar,
unsigned int versionId);
172 PolymerType::Enum polymerType_;
236 {
return monomerId_; }
242 {
return vertexIds_; }
248 {
return vertexIds_[i]; }
260 {
return polymerType_; }
265 template <
class Archive>
Descriptor for a block within an acyclic block polymer.
void setVertexIds(int vertexAId, int vertexBId)
Set indices of associated vertices.
int id() const
Get the id of this block.
void setPolymerType(PolymerType::Enum type)
Set the polymer type (branched or linear).
PolymerType::Enum polymerType() const
Get the type of the parent polymer (branched or linear).
friend std::istream & operator>>(std::istream &in, Edge &block)
Input stream extractor (>>) for a Edge.
const Pair< int > & vertexIds() const
Get the pair of associated vertex ids.
friend std::ostream & operator<<(std::ostream &out, const Edge &block)
Output stream inserter (<<) for a Edge.
virtual void setLength(double length)
Set the length of this block.
void serialize(Archive &ar, unsigned int versionId)
Serialize to/from archive.
int monomerId() const
Get the monomer type id.
virtual ~Edge()
Destructor.
int vertexId(int i) const
Get id of an associated vertex.
void setMonomerId(int monomerId)
Set the monomer type id.
void setId(int id)
Set the id for this block.
double length() const
Get the length (number of monomers) in this block.
An array of exactly 2 objects.
PSCF package top-level namespace.
Utility classes for scientific computation.
std::istream & operator>>(std::istream &in, Pair< Data > &pair)
Input a Pair from an istream.
std::ostream & operator<<(std::ostream &out, const Pair< Data > &pair)
Output a Pair to an ostream, without line breaks.