29 #ifndef GUM_ClassDependencyGraph_H 30 #define GUM_ClassDependencyGraph_H 32 #include <agrum/PRM/PRM.h> 45 template <
typename GUM_SCALAR >
108 void _addNode_(
const PRMClassElementContainer< GUM_SCALAR >* c,
109 const PRMClassElement< GUM_SCALAR >& elt);
112 void _addArcs_(
const PRMClassElementContainer< GUM_SCALAR >& c,
114 HashTable<
const PRMClassElement< GUM_SCALAR >*, NodeId >& map);
145 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 152 #include <agrum/PRM/classDependencyGraph_tpl.h> ~ClassDependencyGraph()
Destructor.
void _addArcs_(const PRMClassElementContainer< GUM_SCALAR > &c, NodeId node, HashTable< const PRMClassElement< GUM_SCALAR > *, NodeId > &map)
Add arcs in graph.
void _buildGraph_(const PRM< GUM_SCALAR > &prm)
Build the class dependency graph.
const DAG & dag() const
Returns a constant reference over the graph of the DAG representing the ClassDependencyGraph<GUM_SCAL...
INLINE void emplace(Args &&... args)
NodeProperty< Size > _modalitites_
The modalities map for each node in the ClassDependencyGraph<GUM_SCALAR>. This is useful when using a...
const EltPair & get(NodeId id) const
Returns a constant reference over the element assiociated with the node id in the ClassDependencyGrap...
ClassDependencyGraph(const PRM< GUM_SCALAR > &prm)
Default constructor.
NodeProperty< EltPair *> _elt_map_
Mapping between the nodes in graph with the PRMClassElement<GUM_SCALAR> in the PRM<GUM_SCALAR>.
ClassDependencyGraph(const ClassDependencyGraph< GUM_SCALAR > &source)
Copy constructor.
ParamScopeData(const std::string &s, const PRMReferenceSlot< GUM_SCALAR > &ref, Idx d)
DAG _graph_
The graph itself.
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.
void _addNode_(const PRMClassElementContainer< GUM_SCALAR > *c, const PRMClassElement< GUM_SCALAR > &elt)
Add nodes in graph while updating consequently all the mappings.
const NodeProperty< Size > & modalities() const
Returns a mapping between the ClassDependencyGraph<GUM_SCALAR>'s nodes and their modalities.
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.