Class used to assign electrons to a molecule.
More...
#include <indigox/graph/assignment.hpp>
|
using | NbrsIter = VertContain::const_iterator |
| Type of the iterator returned by the GetNeihbours() method. More...
|
|
using | VertIter = VertContain::const_iterator |
| Type of the iterator returned by the GetVertices() method. More...
|
|
Class used to assign electrons to a molecule.
An IXAssignmentGraph is generated from an IXMolecularGraph at a fixed point in time. This means that there are no modification methods available for adding or removing vertices to/from an IXAssignmentGraph. Additionally, the edges of the graph are not accessible in any way.
◆ NbrsIter
using NbrsIter = VertContain::const_iterator |
Type of the iterator returned by the GetNeihbours() method.
◆ VertIter
using VertIter = VertContain::const_iterator |
◆ IXAssignmentGraph() [1/2]
◆ IXAssignmentGraph() [2/2]
Construct from a molecular graph.
- Parameters
-
g | molecular graph to construct from. |
◆ Degree()
size_t Degree |
( |
const AGVertex & |
v | ) |
const |
|
inline |
Get the degree of a vertex.
If the provided vertex is not part of the graph, the returned value is std::numeric_limits<size_>::max()
- Returns
- the degree of the vertex.
◆ GetNeighbours()
Get the neighbours of a vertex.
If the vertex is not part of the graph, the returned iterator pair are an empty range.
- Parameters
-
v | the vertex to get neighbours of. |
- Returns
- a pair of iterators across the neighbours of the vertex.
◆ GetVertex() [1/2]
Get the AGVertex associated with an MGVertex.
If the provided MGVertex is not associated with the graph, the returned AGVertex is empty.
- Parameters
-
v | the MGVertex to get associated AGVertex for. |
- Returns
- the AGVertex associated with the MGVertex.
◆ GetVertex() [2/2]
Get the AGVertex associated with an MGEdge.
If the provided MGEdge is not associated with the graph, the returned AGVertex is empty.
- Parameters
-
e | the MGEdge to get associated AGVertex for. |
- Returns
- the AGVertex associated with the MGEdge.
◆ GetVertices()
Get the vertices of the graph.
- Returns
- a pair of iterators across the vertices of the graph.
◆ HasVertex() [1/3]
bool HasVertex |
( |
const AGVertex & |
v | ) |
const |
|
inline |
◆ HasVertex() [2/3]
bool HasVertex |
( |
const MGVertex & |
v | ) |
const |
|
inline |
Check if an IXMGVertex has an associated vertex in this graph.
- Parameters
-
v | the IXMGVertex to check for. |
- Returns
- if
v
is associated with the graph or not.
◆ HasVertex() [3/3]
bool HasVertex |
( |
const MGEdge & |
e | ) |
const |
|
inline |
Check if an IXMGEdge has an associated vertex in this graph.
- Parameters
-
- Returns
- if
e
is associated with the graph or not.
◆ NumVertices()
size_t NumVertices |
( |
| ) |
const |
|
inline |
Get the number of vertices in the graph.
- Returns
- the number of vertices in the graph.
◆ PreassignElectrons()
void PreassignElectrons |
( |
| ) |
|
Check if the graph is connected.
- Returns
- if the graph is connected or not.
Populate the pre-assigned state of all vertices.
The assigned electrons are as follows:
- Six electrons on one coordinate F, Cl, and Br.
- Four electrons on one coordinate O, and S.
- Two electrons on one coordinate N.
- Four electrons on two coordinate O, and S.
- No electrons on all other types of atoms.
- Two electrons on all bonds.
◆ indigox::test::TestAssignmentGraph
friend struct indigox::test::TestAssignmentGraph |
|
friend |
The documentation for this class was generated from the following file: