3.2.12.4. graph/GraphInterface.hpp¶
This header contains the definitions for the graph interface for graph::Graph
.
3.2.12.4.1. Class graph::Graph::Vertex
¶
3.2.12.4.1.1. Synopsis¶
-
Vertex()
-
explicit operator bool() const
-
bool isNull() const
-
std::size_t getId() const
-
std::shared_ptr<Graph> getGraph() const
-
std::size_t getDegree() const
-
IncidentEdgeRange incidentEdges() const
-
const std::string &getStringLabel() const
-
AtomId getAtomId() const
-
Isotope getIsotope() const
-
Charge getCharge() const
-
bool getRadical() const
-
std::string printStereo() const
-
std::string printStereo(const Printer &p) const
3.2.12.4.1.2. Details¶
-
Vertex()¶
Constructs a null descriptor.
-
bool isNull() const¶
- Returns:
whether this is a null descriptor or not.
-
std::size_t getId() const¶
- Returns:
the index of the vertex. It will be in the range \([0, numVertices[\).
- Throws:
LogicError
if it is a null descriptor.
-
std::shared_ptr<Graph> getGraph() const¶
- Returns:
the graph the vertex belongs to.
- Throws:
LogicError
if it is a null descriptor.
-
std::size_t getDegree() const¶
- Returns:
the degree of the vertex.
- Throws:
LogicError
if it is a null descriptor.
-
IncidentEdgeRange incidentEdges() const¶
- Returns:
a range of incident edges to this vertex.
- Throws:
LogicError
if it is a null descriptor.
-
const std::string &getStringLabel() const¶
- Returns:
the string label of the vertex.
- Throws:
LogicError
if it is a null descriptor.
-
AtomId getAtomId() const¶
- Returns:
the atom id of the vertex.
- Throws:
LogicError
if it is a null descriptor.
-
Isotope getIsotope() const¶
- Returns:
the isotope of the vertex.
- Throws:
LogicError
if it is a null descriptor.
-
Charge getCharge() const¶
- Returns:
the charge of the vertex.
- Throws:
LogicError
if it is a null descriptor.
-
bool getRadical() const¶
- Returns:
the radical status of the vertex.
- Throws:
LogicError
if it is a null descriptor.
-
std::string printStereo() const¶
-
std::string printStereo(const Printer &p) const¶
Print the stereo configuration for the vertex.
- Returns:
the name of the PDF-file that will be compiled in post-processing.
- Throws:
LogicError
if it is a null descriptor.
3.2.12.4.2. Class graph::Graph::Edge
¶
3.2.12.4.2.1. Synopsis¶
3.2.12.4.2.2. Details¶
-
Edge()¶
Constructs a null descriptor.
-
bool isNull() const¶
- Returns:
whether this is a null descriptor or not.
-
std::shared_ptr<Graph> getGraph() const¶
- Returns:
the graph the edge belongs to.
- Throws:
LogicError
if it is a null descriptor.
-
Vertex source() const¶
- Returns:
the source vertex of the edge.
- Throws:
LogicError
if it is a null descriptor.
-
Vertex target() const¶
- Returns:
the target vertex of the edge.
- Throws:
LogicError
if it is a null descriptor.
-
const std::string &getStringLabel() const¶
- Returns:
the string label of the edge.
- Throws:
LogicError
if it is a null descriptor.
-
BondType getBondType() const¶
- Returns:
the bond type of the edge.
- Throws:
LogicError
if it is a null descriptor.
3.2.12.4.3. Class graph::Graph::VertexIterator
¶
-
class graph::Graph::VertexIterator¶
An iterator for traversing all vertices in a graph. It models a forward iterator.
3.2.12.4.3.1. Synopsis¶
3.2.12.4.3.2. Details¶
-
VertexIterator()¶
Construct a past-the-end iterator.
3.2.12.4.4. Class graph::Graph::VertexRange
¶
3.2.12.4.4.1. Synopsis¶
3.2.12.4.5. Class graph::Graph::EdgeIterator
¶
-
class graph::Graph::EdgeIterator¶
An iterator for traversing all edges in a graph. It models a forward iterator.
3.2.12.4.5.1. Synopsis¶
3.2.12.4.5.2. Details¶
-
EdgeIterator()¶
Construct a past-the-end iterator.
3.2.12.4.6. Class graph::Graph::EdgeRange
¶
3.2.12.4.6.1. Synopsis¶
3.2.12.4.7. Class graph::Graph::IncidentEdgeIterator
¶
-
class graph::Graph::IncidentEdgeIterator¶
An iterator for traversing all edges in a graph. It models a forward iterator.
3.2.12.4.7.1. Synopsis¶
3.2.12.4.7.2. Details¶
-
IncidentEdgeIterator()¶
Construct a past-the-end iterator.