Direct Graphical Models  v.1.7.0
GraphKit.h
1 // Abstract Kit classes for constructing the Graph instances
2 // Written by Sergey Kosov in 2018 for Project X
3 #pragma once
4 
5 #include "types.h"
6 
7 namespace DirectGraphicalModels
8 {
10  enum class GraphType {
11  pairwise,
12  dense
13  };
14 
15  class CGraph;
16  class CInfer;
17  class CGraphExt;
18 
19  // ================================ Graph Kit Abstract Factory Class ===============================
27  class CGraphKit {
28  public:
29  DllExport CGraphKit() = default;
30  DllExport CGraphKit(const CGraphKit&) = delete;
31  DllExport virtual ~CGraphKit() = default;
32  DllExport const CGraphKit& operator=(const CGraphKit&) = delete;
33 
41  DllExport static std::shared_ptr<CGraphKit> create(GraphType graphType, byte nStates);
46  DllExport virtual CGraph& getGraph() = 0;
51  DllExport virtual CInfer& getInfer() = 0;
56  DllExport virtual CGraphExt& getGraphExt() = 0;
57  };
58 }
virtual CGraphExt & getGraphExt()=0
Returns the graph extension object.
Abstract Kit class for constructing Graph-related objects.
Definition: GraphKit.h:27
virtual CInfer & getInfer()=0
Returns the inference / decoding object.
virtual CGraph & getGraph()=0
Returns the graph object.
Interface class for graphical models.
Definition: Graph.h:14
General graph extension abstract class for 2D image classifaction.
Definition: GraphExt.h:16
const CGraphKit & operator=(const CGraphKit &)=delete
Base abstract class for random model inference.
Definition: Infer.h:19
GraphType
Types of the graphical model.
Definition: GraphKit.h:10
static std::shared_ptr< CGraphKit > create(GraphType graphType, byte nStates)
Factory method returning graph kit object.
Definition: GraphKit.cpp:8