indigoX
permutablegraph.hpp
Go to the documentation of this file.
1 //
2 // permutablegraph.hpp
3 // indigox
4 //
5 // Created by Ivan Welsh on 13/01/18.
6 // Copyright © 2018 Hermes Productions. All rights reserved.
7 //
8 
9 #ifndef INDIGOX_CLASSES_PERMUTABLEGRAPH_HPP
10 #define INDIGOX_CLASSES_PERMUTABLEGRAPH_HPP
11 
12 #include "../utils/graph.hpp"
13 #include "molecular_graph.hpp"
14 
15 #include <memory>
16 #include <vector>
17 
18 namespace indigox {
19  struct PermVertProp {
20  MolVertPair source;
21  uid_t bag;
22  };
23 
25  typedef std::shared_ptr<_PermutableGraph> PermutableGraph;
26  typedef utils::Graph<PermVertProp> _PermGraph;
27  typedef _PermGraph::VertType PermVertex;
28  typedef _PermGraph::NbrsIter PermNbrsIter;
29  typedef _PermGraph::VertIter PermVertIter;
30  typedef _PermGraph::NbrsIterPair PermNbrsIterPair;
31  typedef _PermGraph::VertIterPair PermVertIterPair;
32  typedef _PermGraph::EdgeIterPair PermEdgeIterPair;
33 
34  typedef std::vector<PermVertex> ElimOrder;
35 
36  class _PermutableGraph : public _PermGraph {
37  public:
39  _PermutableGraph(MolecularGraph);
41 
42  public:
43  void SetInput(MolecularGraph);
45  std::string ToDGFString();
46  MolecularGraph GetSourceGraph() { return source_; }
47  std::string PGVToMGVTable();
48 
49  private:
50  MolecularGraph source_;
51  };
52 } // namespace indigox
53 
54 #endif /* INDIGOX_CLASSES_PERMUTABLEGRAPH_HPP */
_PermGraph::NbrsIterPair PermNbrsIterPair
Definition: permutablegraph.hpp:30
MolecularGraph GetSourceGraph()
Definition: permutablegraph.hpp:46
utils::Graph< PermVertProp > _PermGraph
Definition: permutablegraph.hpp:26
std::vector< PermVertex > ElimOrder
Definition: permutablegraph.hpp:34
_PermGraph::VertIter PermVertIter
Definition: permutablegraph.hpp:29
Definition: permutablegraph.hpp:19
_PermGraph::VertType PermVertex
Definition: permutablegraph.hpp:27
uid_t bag
Definition: permutablegraph.hpp:21
Namespace for all graph related functionality.
Definition: access.hpp:7
MolVertPair source
Definition: permutablegraph.hpp:20
Definition: permutablegraph.hpp:36
void EliminateVertex(PermVertex)
void SetInput(MolecularGraph)
std::shared_ptr< _PermutableGraph > PermutableGraph
Definition: permutablegraph.hpp:24
_PermGraph::VertIterPair PermVertIterPair
Definition: permutablegraph.hpp:31
_PermGraph::NbrsIter PermNbrsIter
Definition: permutablegraph.hpp:28
std::string PGVToMGVTable()
_PermGraph::EdgeIterPair PermEdgeIterPair
Definition: permutablegraph.hpp:32