![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
This class represent the dependencies of all classes in a PRM<GUM_SCALAR>. More...
#include <agrum/PRM/classDependencyGraph.h>
Public Member Functions | |
Constructors and Destructor. | |
ClassDependencyGraph (const PRM< GUM_SCALAR > &prm) | |
Default constructor. More... | |
ClassDependencyGraph (const ClassDependencyGraph< GUM_SCALAR > &source) | |
Copy constructor. More... | |
~ClassDependencyGraph () | |
Destructor. More... | |
Getters & setters. | |
const DAG & | dag () const |
Returns a constant reference over the graph of the DAG representing the ClassDependencyGraph<GUM_SCALAR>. More... | |
const EltPair & | get (NodeId id) const |
Returns a constant reference over the element assiociated with the node id in the ClassDependencyGraph<GUM_SCALAR>. More... | |
NodeId | get (const PRMClassElementContainer< GUM_SCALAR > &c, const PRMClassElement< GUM_SCALAR > &elt) const |
Returns the NodeId assign to the given PRMClassElement<GUM_SCALAR> of a given Class. Is is necessary to give both Class and PRMClassElement<GUM_SCALAR> because inherited PRMClassElement<GUM_SCALAR> are shared in the inheritance hierarchy. More... | |
const NodeProperty< Size > & | modalities () const |
Returns a mapping between the ClassDependencyGraph<GUM_SCALAR>'s nodes and their modalities. More... | |
Public Types | |
typedef std::pair< const PRMClassElementContainer< GUM_SCALAR > *, const PRMClassElement< GUM_SCALAR > *> | EltPair |
Association between a class element and it's holding class. More... | |
This class represent the dependencies of all classes in a PRM<GUM_SCALAR>.
A Class Dependency Graph does listen to changes in it's PRM<GUM_SCALAR>.
Definition at line 46 of file classDependencyGraph.h.
typedef std::pair< const PRMClassElementContainer< GUM_SCALAR >*, const PRMClassElement< GUM_SCALAR >* > gum::prm::ClassDependencyGraph< GUM_SCALAR >::EltPair |
Association between a class element and it's holding class.
Definition at line 51 of file classDependencyGraph.h.
|
private |
Code shortcut.
Definition at line 136 of file classDependencyGraph.h.
INLINE gum::prm::ClassDependencyGraph< GUM_SCALAR >::ClassDependencyGraph | ( | const PRM< GUM_SCALAR > & | prm | ) |
Default constructor.
prm | The PRM<GUM_SCALAR> for which this ClassDependencyGraph<GUM_SCALAR> is constructed. |
Definition at line 103 of file classDependencyGraph_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE gum::prm::ClassDependencyGraph< GUM_SCALAR >::ClassDependencyGraph | ( | const ClassDependencyGraph< GUM_SCALAR > & | source | ) |
Copy constructor.
Definition at line 109 of file classDependencyGraph_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
gum::prm::ClassDependencyGraph< GUM_SCALAR >::~ClassDependencyGraph | ( | ) |
Destructor.
Definition at line 35 of file classDependencyGraph_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
|
private |
Add arcs in graph.
Definition at line 72 of file classDependencyGraph_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
|
private |
Add nodes in graph while updating consequently all the mappings.
Definition at line 146 of file classDependencyGraph_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
|
private |
Build the class dependency graph.
Definition at line 47 of file classDependencyGraph_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE const DAG & gum::prm::ClassDependencyGraph< GUM_SCALAR >::dag | ( | ) | const |
Returns a constant reference over the graph of the DAG representing the ClassDependencyGraph<GUM_SCALAR>.
Definition at line 123 of file classDependencyGraph_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE const ClassDependencyGraph< GUM_SCALAR >::EltPair & gum::prm::ClassDependencyGraph< GUM_SCALAR >::get | ( | NodeId | id | ) | const |
Returns a constant reference over the element assiociated with the node id in the ClassDependencyGraph<GUM_SCALAR>.
NotFound | Raised if no nodes matches id. |
Definition at line 129 of file classDependencyGraph_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE NodeId gum::prm::ClassDependencyGraph< GUM_SCALAR >::get | ( | const PRMClassElementContainer< GUM_SCALAR > & | c, |
const PRMClassElement< GUM_SCALAR > & | elt | ||
) | const |
Returns the NodeId assign to the given PRMClassElement<GUM_SCALAR> of a given Class. Is is necessary to give both Class and PRMClassElement<GUM_SCALAR> because inherited PRMClassElement<GUM_SCALAR> are shared in the inheritance hierarchy.
Definition at line 135 of file classDependencyGraph_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
INLINE const NodeProperty< Size > & gum::prm::ClassDependencyGraph< GUM_SCALAR >::modalities | ( | ) | const |
Returns a mapping between the ClassDependencyGraph<GUM_SCALAR>'s nodes and their modalities.
Definition at line 141 of file classDependencyGraph_tpl.h.
References gum::prm::ParamScopeData< GUM_SCALAR >::ParamScopeData().
|
private |
Mapping between the nodes in graph with the PRMClassElement<GUM_SCALAR> in the PRM<GUM_SCALAR>.
Definition at line 131 of file classDependencyGraph.h.
|
private |
The graph itself.
Definition at line 117 of file classDependencyGraph.h.
|
private |
The modalities map for each node in the ClassDependencyGraph<GUM_SCALAR>. This is useful when using a Triangulation class over a ClassDependencyGraph<GUM_SCALAR>.
Definition at line 124 of file classDependencyGraph.h.
|
private |
Map each Class to a HashTable mapping the Class's ClassElements to their assigned NodeId in graph.
Definition at line 141 of file classDependencyGraph.h.