2 #ifndef INDIGOX_GRAPH_CONDENSED_HPP 3 #define INDIGOX_GRAPH_CONDENSED_HPP 5 #include "../utils/fwd_declares.hpp" 8 #include <EASTL/bitset.h> 9 #include <EASTL/vector_map.h> 10 #include <EASTL/vector_set.h> 38 using CondensedVertex = std::pair<ContractedSymmetry, MGVertex>;
52 template <
typename Archive>
53 void serialise(Archive &archive,
const uint32_t version);
87 std::shared_ptr<CMGVertexData> m_data;
110 template <
typename Archive>
111 void serialise(Archive &archive,
const uint32_t version);
128 std::shared_ptr<CMGEdgeData> m_data;
132 :
public BaseGraph<CMGVertex, CMGEdge, CondensedMolecularGraph> {
149 using VertMap = eastl::vector_map<MGVertex, CMGVertex>;
151 using EdgeMap = eastl::vector_map<MGEdge, CMGEdge>;
159 using NbrsIter = NbrsContain::mapped_type::const_iterator;
166 template <
typename Archive>
167 void serialise(Archive &archive,
const uint32_t version);
219 std::vector<CMGEdge> &edges);
273 std::shared_ptr<Impl> m_data;
const std::vector< CondensedVertex > & GetCondensedVertices() const
EdgeContain::const_iterator EdgeIter
Type of the iterator returned by GetEdges() method.
Definition: condensed.hpp:155
#define INDIGOX_GENERIC_PIMPL_CLASS_DEFAULTS(class_name)
Definition: fwd_declares.hpp:18
CondensedMolecularGraph Condense(const MolecularGraph &G)
friend class cereal::access
Friendship allows for serialisation.
Definition: condensed.hpp:36
const MolecularGraph & GetMolecularGraph() const
Get the source MolecularGraph.
bool HasVertex(const CMGVertex &v) const
Is the vertex in the graph.
Definition: base_graph_impl.hpp:187
VertContain::const_iterator VertIter
Type of the iterator returned by GetVertices() method.
Definition: condensed.hpp:157
NbrsContain::mapped_type::const_iterator NbrsIter
Type of the iterator returned by GetNeighbours() method.
Definition: condensed.hpp:159
Definition: assignment.hpp:16
std::map< CMGVertex, VertContain > NbrsContain
Container for neighbours of vertices.
Definition: condensed.hpp:147
Definition: condensed.hpp:131
Group for contracted hydrogen atoms.
friend class cereal::access
Friendship allows for serialisation.
Definition: condensed.hpp:96
const CondensedMolecularGraph & GetGraph() const
Get the graph this edge is part of.
Class for the vertices of an IXCondensedMolecularGraph.
Definition: condensed.hpp:21
const CMGVertex & GetVertex(const MGVertex &v) const
Get the vertex associated with an MGVertex.
Class for the edges of a IXMolecularGraph.
Definition: molecular.hpp:55
const CondensedMolecularGraph & GetSuperGraph() const
Group for contracted bromine atoms.
std::vector< CMGEdge > EdgeContain
Container for edges.
Definition: condensed.hpp:145
Class containing a graph representation of a molecule.
Definition: molecular.hpp:95
friend CondensedMolecularGraph Condense(const MolecularGraph &)
Friendship allows for generating from a source.
bool HasCondensedVertex(const MGVertex &v) const
Check of the graph has a vertex associated with an MGVertex.
Group for contracted chlorine atoms.
Class for the vertices of a IXMolecularGraph.
Definition: molecular.hpp:20
const MGVertex & GetSource() const
Get the MGVertex associated with this vertex.
eastl::bitset< 37, uint64_t > VertexIsoMask
type used to store the isomorphism testing mask for IXCMGVertex.
Definition: condensed.hpp:16
const VertexIsoMask & GetIsomorphismMask() const
Get the isomorphism testing mask.
const MGEdge & GetSource() const
Get the MGEdge associated with this vertex.
Group for contracted fluorine atoms.
bool HasEdge(const CMGEdge &e) const
Is the edge in the graph.
Definition: base_graph_impl.hpp:192
CondensedMolecularGraph Subgraph(std::vector< CMGVertex > &verts)
Induce a subgraph from the range of vertices.
eastl::bitset< 14, uint16_t > EdgeIsoMask
type used to store the isomorphism testing mask for IXCMGEdge.
Definition: condensed.hpp:18
std::vector< CMGVertex > VertContain
Container for vertices.
Definition: condensed.hpp:143
const EdgeIsoMask & GetIsomorphismMask() const
Get the isomorphism testing mask.
const CondensedMolecularGraph & GetGraph() const
Get the graph this vertex is part of.
#define INDIGOX_GENERIC_PIMPL_CLASS_OPERATORS(class_name, short_name)
Definition: fwd_declares.hpp:26
CMGEdge GetEdge(const CMGVertex &u, const CMGVertex &v) const
Get the edge between two vertices.
Definition: base_graph_impl.hpp:267
bool HasEdge(const MGEdge &e) const
Check if the graph has an edge associated with an MGEdge.
Group for contracted iodine atoms.
eastl::vector_map< MGVertex, CMGVertex > VertMap
Container for mapping MGVertex to vertices.
Definition: condensed.hpp:149
const CMGVertex & GetCondensedVertex(const MGVertex &v) const
std::vector< MGVertex > GetContractedVertices() const
Template base class for all graphs used in the indigoX library.
Definition: base_graph.hpp:56
const CMGEdge & GetEdge(const MGEdge &e) const
Get the edge associated with an MGEdge.
size_t NumContracted() const
Get the number of contracted vertices.
bool IsContractedHere(const MGVertex &v) const
Checks if a given MGVertex is contracted into this vertex.
eastl::vector_map< MGEdge, CMGEdge > EdgeMap
Container for mapping MGEdge to edges.
Definition: condensed.hpp:151
Class for the edges of an IXCondensedMolecularGraph.
Definition: condensed.hpp:92
bool HasVertex(const MGVertex &v) const
Check if the graph has a vertex directly associated with an MGVertex.
ContractedSymmetry
Enum for the contracted symmetry groups.
Definition: condensed.hpp:24
CondensedMolecularGraph()=default
friend class cereal::access
Friendship allows serialisation.
Definition: condensed.hpp:135