indigoX
isomorphism.hpp
Go to the documentation of this file.
1 #include "../../utils/fwd_declares.hpp"
2 
3 #include <EASTL/vector_map.h>
4 
5 #ifndef INDIGOX_ALGORITHM_GRAPH_ISOMORPHISM_HPP
6 #define INDIGOX_ALGORITHM_GRAPH_ISOMORPHISM_HPP
7 
8 namespace indigox::algorithm {
9 
10  template <class V, class E, class S, class D, class VP, class EP>
11  struct MappingCallback {
13  using CorrespondenceMap = eastl::vector_map<V, V>;
14  virtual bool operator()(const CorrespondenceMap &) { return true; }
15  virtual bool operator()(const V &, const V &) { return true; }
16  virtual bool operator()(const E &, const E &) { return true; }
17  virtual ~MappingCallback() = default;
18  };
19 
20  struct CMGCallback
21  : public MappingCallback<
22  graph::CMGVertex, graph::CMGEdge, graph::CondensedMolecularGraph,
23  graph::Undirected, graph::GraphLabel, graph::GraphLabel> {};
24 
25  struct MGCallback
26  : public MappingCallback<graph::MGVertex, graph::MGEdge,
27  graph::MolecularGraph, graph::Undirected,
28  graph::GraphLabel, graph::GraphLabel> {};
29 
30  struct CMGPrintCallback : public CMGCallback {
31  int count;
33  bool operator()(const CorrespondenceMap &cmap) override;
34  bool operator()(const graph::CMGVertex &vs,
35  const graph::CMGVertex &vl) override;
36  };
37 
38  struct MGPrintCallback : public MGCallback {
39  int count;
41  bool operator()(const CorrespondenceMap &cmap) override;
42  };
43 
46  CMGCallback &callback);
47 
49  graph::MolecularGraph &G2, MGCallback &callback);
50 } // namespace indigox::algorithm
51 
52 #endif /* INDIGOX_ALGORITHM_GRAPH_ISOMORPHISM_HPP */
Definition: access.hpp:7
int count
Definition: isomorphism.hpp:39
Definition: isomorphism.hpp:38
Definition: condensed.hpp:131
virtual bool operator()(const V &, const V &)
Definition: isomorphism.hpp:15
Class for the vertices of an IXCondensedMolecularGraph.
Definition: condensed.hpp:21
Definition: isomorphism.hpp:20
Class containing a graph representation of a molecule.
Definition: molecular.hpp:95
Definition: isomorphism.hpp:11
bool operator()(const CorrespondenceMap &cmap) override
bool operator()(const CorrespondenceMap &cmap) override
int count
Definition: isomorphism.hpp:31
CMGPrintCallback()
Definition: isomorphism.hpp:32
Definition: isomorphism.hpp:25
virtual bool operator()(const CorrespondenceMap &)
Definition: isomorphism.hpp:14
Template base class for all graphs used in the indigoX library.
Definition: base_graph.hpp:56
void SubgraphIsomorphisms(graph::CondensedMolecularGraph &G1, graph::CondensedMolecularGraph &G2, CMGCallback &callback)
virtual bool operator()(const E &, const E &)
Definition: isomorphism.hpp:16
Definition: isomorphism.hpp:30
MGPrintCallback()
Definition: isomorphism.hpp:40