49#ifndef GUM_ClassDependencyGraph_H
50#define GUM_ClassDependencyGraph_H
65 template <
typename GUM_SCALAR >
69 using EltPair = std::pair< const PRMClassElementContainer< GUM_SCALAR >*,
164#ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
Inline implementation of ClassDependencyGraph.
The class for generic Hash Tables.
This class represent the dependencies of all classes in a PRM<GUM_SCALAR>.
NodeProperty< EltPair * > _elt_map_
Mapping between the nodes in graph with the PRMClassElement<GUM_SCALAR> in the PRM<GUM_SCALAR>.
NodeProperty< Size > _modalitites_
The modalities map for each node in the ClassDependencyGraph<GUM_SCALAR>. This is useful when using a...
const NodeProperty< Size > & modalities() const
Returns a mapping between the ClassDependencyGraph<GUM_SCALAR>'s nodes and their modalities.
const EltPair & get(NodeId id) const
Returns a constant reference over the element assiociated with the node id in the ClassDependencyGrap...
void _buildGraph_(const PRM< GUM_SCALAR > &prm)
Build the class dependency graph.
~ClassDependencyGraph()
Destructor.
DAG _graph_
The graph itself.
ClassDependencyGraph(const PRM< GUM_SCALAR > &prm)
Default constructor.
void _addArcs_(const PRMClassElementContainer< GUM_SCALAR > &c, NodeId node, HashTable< const PRMClassElement< GUM_SCALAR > *, NodeId > &map)
Add arcs in graph.
const DAG & dag() const
Returns a constant reference over the graph of the DAG representing the ClassDependencyGraph<GUM_SCAL...
void _addNode_(const PRMClassElementContainer< GUM_SCALAR > *c, const PRMClassElement< GUM_SCALAR > &elt)
Add nodes in graph while updating consequently all the mappings.
NodeMap _node_map_
Map each Class to a HashTable mapping the Class's ClassElements to their assigned NodeId in graph.
HashTable< const PRMClassElementContainer< GUM_SCALAR > *, HashTable< const PRMClassElement< GUM_SCALAR > *, NodeId > * > NodeMap
Code shortcut.
std::pair< const PRMClassElementContainer< GUM_SCALAR > *, const PRMClassElement< GUM_SCALAR > * > EltPair
Association between a class element and it's holding class.
<agrum/PRM/classElementContainer.h>
Abstract class representing an element of PRM class.
This class represents a Probabilistic Relational PRMSystem<GUM_SCALAR>.
Size NodeId
Type for node ids.
HashTable< NodeId, VAL > NodeProperty
Property on graph elements.
namespace for all probabilistic relational models entities
gum is the global namespace for all aGrUM entities