45 vertexIds_[0] = vertexId0;
46 vertexIds_[1] = vertexId1;
65 { polymerType_ = type; }
72 in >> block.monomerId_;
74 if (block.polymerType_ == PolymerType::Branched) {
75 in >> block.vertexIds_[0];
76 in >> block.vertexIds_[1];
87 out <<
" " << block.monomerId_;
89 out.setf(std::ios::scientific);
93 if (block.polymerType_ == PolymerType::Branched) {
94 out <<
" " << block.vertexIds_[0];
95 out <<
" " << block.vertexIds_[1];
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).
virtual void setLength(double length)
Set the length of this block.
int monomerId() const
Get the monomer type id.
virtual ~Edge()
Destructor.
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.
PSCF package top-level namespace.
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.
Struct containing an enumeration of polymer structure types.