Direct Graphical Models  v.1.7.0
GraphExt.h
1 // Extended Graph abstract class interface;
2 // Written by Sergey Kosov in 2018 for Project X
3 #pragma once
4 
5 #include "types.h"
6 
7 namespace DirectGraphicalModels
8 {
9  // ================================ Extended Graph Class ================================
16  class CGraphExt
17  {
18  public:
19  DllExport CGraphExt(void) = default;
20  DllExport CGraphExt(const CGraphExt&) = delete;
21  DllExport virtual ~CGraphExt(void) = default;
22  DllExport const CGraphExt& operator=(const CGraphExt&) = delete;
23 
29  DllExport virtual void buildGraph(Size graphSize) = 0;
42  DllExport virtual void setGraph(const Mat& pots) = 0;
49  DllExport virtual void addDefaultEdgesModel(float val, float weight = 1.0f) = 0;
57  DllExport virtual void addDefaultEdgesModel(const Mat &featureVectors, float val, float weight = 1.0f) = 0;
65  DllExport virtual void addDefaultEdgesModel(const vec_mat_t &featureVectors, float val, float weight = 1.0f) = 0;
70  DllExport virtual Size getSize() const = 0;
71  };
72 }
virtual void buildGraph(Size graphSize)=0
Builds a 2D graph of size corresponding to the image resolution.
virtual void addDefaultEdgesModel(float val, float weight=1.0f)=0
Adds default data-independet edge model.
const CGraphExt & operator=(const CGraphExt &)=delete
virtual void setGraph(const Mat &pots)=0
Fills an existing 2D graph with potentials or builds a new 2D graph of size corresponding to pots...
virtual Size getSize() const =0
Returns the size of the graph.
General graph extension abstract class for 2D image classifaction.
Definition: GraphExt.h:16
virtual ~CGraphExt(void)=default