Interface class for graphical models.
More...
#include <Graph.h>
|
| CGraph (byte nStates) |
| Constructor. More...
|
|
| CGraph (const CGraph &)=delete |
|
virtual | ~CGraph (void)=default |
|
const CGraph & | operator= (const CGraph &)=delete |
|
virtual void | reset (void)=0 |
| Resets the graph. More...
|
|
virtual size_t | addNode (const Mat &pot=EmptyMat)=0 |
| Adds an additional node (with specified potentional) More...
|
|
virtual void | addNodes (const Mat &pots) |
| Adds the graph nodes with potentials. More...
|
|
virtual void | setNode (size_t node, const Mat &pot)=0 |
| Sets or changes the potential of node. More...
|
|
virtual void | setNodes (size_t start_node, const Mat &pots) |
| Fills the graph nodes with new potentials. More...
|
|
virtual void | getNode (size_t node, Mat &pot) const =0 |
| Returns the node potential. More...
|
|
virtual void | getNodes (size_t start_node, size_t num_nodes, Mat &pots) const |
| Returns the node potentials. More...
|
|
virtual void | getChildNodes (size_t node, vec_size_t &vNodes) const =0 |
| Returns the set of IDs of the child nodes of the argument node. More...
|
|
virtual void | getParentNodes (size_t node, vec_size_t &vNodes) const =0 |
| Returns the set of IDs of the parent nodes of the argument node. More...
|
|
virtual size_t | getNumNodes (void) const =0 |
| Returns the number of nodes in the graph. More...
|
|
virtual size_t | getNumEdges (void) const =0 |
| Returns the number of edges in the graph. More...
|
|
byte | getNumStates (void) const |
| Returns number of states (classes) More...
|
|
Interface class for graphical models.
- Author
- Sergey G. Kosov, serge.nosp@m.y.ko.nosp@m.sov@p.nosp@m.roje.nosp@m.ct-10.nosp@m..de
Definition at line 14 of file Graph.h.
◆ CGraph() [1/2]
DirectGraphicalModels::CGraph::CGraph |
( |
byte |
nStates | ) |
|
|
inline |
Constructor.
- Parameters
-
nStates | the number of States (classes) |
Definition at line 21 of file Graph.h.
◆ CGraph() [2/2]
DirectGraphicalModels::CGraph::CGraph |
( |
const CGraph & |
| ) |
|
|
delete |
◆ ~CGraph()
virtual DirectGraphicalModels::CGraph::~CGraph |
( |
void |
| ) |
|
|
virtualdefault |
◆ addNode()
virtual size_t DirectGraphicalModels::CGraph::addNode |
( |
const Mat & |
pot = EmptyMat | ) |
|
|
pure virtual |
◆ addNodes()
void DirectGraphicalModels::CGraph::addNodes |
( |
const Mat & |
pots | ) |
|
|
virtual |
◆ getChildNodes()
virtual void DirectGraphicalModels::CGraph::getChildNodes |
( |
size_t |
node, |
|
|
vec_size_t & |
vNodes |
|
) |
| const |
|
pure virtual |
◆ getNode()
virtual void DirectGraphicalModels::CGraph::getNode |
( |
size_t |
node, |
|
|
Mat & |
pot |
|
) |
| const |
|
pure virtual |
◆ getNodes()
void DirectGraphicalModels::CGraph::getNodes |
( |
size_t |
start_node, |
|
|
size_t |
num_nodes, |
|
|
Mat & |
pots |
|
) |
| const |
|
virtual |
Returns the node potentials.
This function supports PPL
- Parameters
-
[in] | start_node | The index of the node, starting from which the potentials should be got |
[in] | num_nodes | The number of nodes potentials to acquire. 0 means - read nodes from start_node till the last one. |
[out] | pots | A block of potentials: Mat(size: num_nodes x nStates; type: CV_32FC1) |
Reimplemented in DirectGraphicalModels::CGraphDense.
Definition at line 30 of file Graph.cpp.
◆ getNumEdges()
virtual size_t DirectGraphicalModels::CGraph::getNumEdges |
( |
void |
| ) |
const |
|
pure virtual |
◆ getNumNodes()
virtual size_t DirectGraphicalModels::CGraph::getNumNodes |
( |
void |
| ) |
const |
|
pure virtual |
◆ getNumStates()
byte DirectGraphicalModels::CGraph::getNumStates |
( |
void |
| ) |
const |
|
inline |
Returns number of states (classes)
- Returns
- Number of states (features)
Definition at line 99 of file Graph.h.
◆ getParentNodes()
virtual void DirectGraphicalModels::CGraph::getParentNodes |
( |
size_t |
node, |
|
|
vec_size_t & |
vNodes |
|
) |
| const |
|
pure virtual |
◆ operator=()
const CGraph& DirectGraphicalModels::CGraph::operator= |
( |
const CGraph & |
| ) |
|
|
delete |
◆ reset()
virtual void DirectGraphicalModels::CGraph::reset |
( |
void |
| ) |
|
|
pure virtual |
◆ setNode()
virtual void DirectGraphicalModels::CGraph::setNode |
( |
size_t |
node, |
|
|
const Mat & |
pot |
|
) |
| |
|
pure virtual |
◆ setNodes()
void DirectGraphicalModels::CGraph::setNodes |
( |
size_t |
start_node, |
|
|
const Mat & |
pots |
|
) |
| |
|
virtual |
Fills the graph nodes with new potentials.
This function supports PPL
- Parameters
-
start_node | The index of the node, starting from which the potentials should be set |
pots | A block of potentials: Mat(size: nNodes x nStates; type: CV_32FC1) |
Reimplemented in DirectGraphicalModels::CGraphDense.
Definition at line 11 of file Graph.cpp.
◆ m_nStates
byte DirectGraphicalModels::CGraph::m_nStates |
|
private |
The number of states (classes)
Definition at line 103 of file Graph.h.
The documentation for this class was generated from the following files: