23 DllExport
virtual ~CGraph(
void) =
default;
32 DllExport
virtual void reset(
void) = 0;
38 DllExport
virtual size_t addNode(
const Mat &pot = EmptyMat) = 0;
43 DllExport
virtual void addNodes(
const Mat &pots);
49 DllExport
virtual void setNode(
size_t node,
const Mat &pot) = 0;
57 DllExport
virtual void setNodes(
size_t start_node,
const Mat &pots);
63 DllExport
virtual void getNode(
size_t node, Mat &pot)
const = 0;
72 DllExport
virtual void getNodes(
size_t start_node,
size_t num_nodes, Mat &pots)
const;
78 DllExport
virtual void getChildNodes(
size_t node, vec_size_t &vNodes)
const = 0;
84 DllExport
virtual void getParentNodes(
size_t node, vec_size_t &vNodes)
const = 0;
89 DllExport
virtual size_t getNumNodes(
void)
const = 0;
94 DllExport
virtual size_t getNumEdges(
void)
const = 0;
virtual void setNode(size_t node, const Mat &pot)=0
Sets or changes the potential of node.
virtual size_t addNode(const Mat &pot=EmptyMat)=0
Adds an additional node (with specified potentional)
byte getNumStates(void) const
Returns number of states (classes)
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.
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.
virtual size_t getNumEdges(void) const =0
Returns the number of edges in the graph.
virtual size_t getNumNodes(void) const =0
Returns the number of nodes in the graph.
virtual void addNodes(const Mat &pots)
Adds the graph nodes with potentials.
virtual void getNode(size_t node, Mat &pot) const =0
Returns the node potential.
Interface class for graphical models.
const CGraph & operator=(const CGraph &)=delete
virtual ~CGraph(void)=default
virtual void getNodes(size_t start_node, size_t num_nodes, Mat &pots) const
Returns the node potentials.
virtual void reset(void)=0
Resets the graph.
byte m_nStates
The number of states (classes)
virtual void setNodes(size_t start_node, const Mat &pots)
Fills the graph nodes with new potentials.
CGraph(byte nStates)
Constructor.