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);
113 addArcs__(
const PRMClassElementContainer< GUM_SCALAR >& c,
115 HashTable<
const PRMClassElement< GUM_SCALAR >*, NodeId >& map);
147 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 154 #include <agrum/PRM/classDependencyGraph_tpl.h> ~ClassDependencyGraph()
Destructor.
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...
NodeProperty< Size > modalitites__
The modalities map for each node in the ClassDependencyGraph<GUM_SCALAR>. This is useful when using a...
INLINE void emplace(Args &&... args)
void addNode__(const PRMClassElementContainer< GUM_SCALAR > *c, const PRMClassElement< GUM_SCALAR > &elt)
Add nodes in graph__ while updating consequently all the mappings.
const EltPair & get(NodeId id) const
Returns a constant reference over the element assiociated with the node id in the ClassDependencyGrap...
void addArcs__(const PRMClassElementContainer< GUM_SCALAR > &c, NodeId node, HashTable< const PRMClassElement< GUM_SCALAR > *, NodeId > &map)
Add arcs in graph__.
NodeMap node_map__
Map each Class to a HashTable mapping the Class's ClassElements to their assigned NodeId in graph__...
ClassDependencyGraph(const PRM< GUM_SCALAR > &prm)
Default constructor.
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.
NodeProperty< EltPair *> elt_map__
Mapping between the nodes in graph__ with the PRMClassElement<GUM_SCALAR> in the PRM<GUM_SCALAR>.
HashTable< const PRMClassElementContainer< GUM_SCALAR > *, HashTable< const PRMClassElement< GUM_SCALAR > *, NodeId > *> NodeMap
Code shortcut.
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.