aGrUM  0.16.0
classDependencyGraph.h
Go to the documentation of this file.
1 
30 #ifndef GUM_ClassDependencyGraph_H
31 #define GUM_ClassDependencyGraph_H
32 
33 #include <agrum/PRM/PRM.h>
34 
35 namespace gum {
36  namespace prm {
37 
46  template < typename GUM_SCALAR >
48  public:
50  typedef std::pair< const PRMClassElementContainer< GUM_SCALAR >*,
53 
54  // ========================================================================
56  // ========================================================================
58 
63 
66 
69 
71  // ========================================================================
73  // ========================================================================
75 
78  const DAG& dag() const;
79 
84  const EltPair& get(NodeId id) const;
85 
95  const PRMClassElement< GUM_SCALAR >& elt) const;
96 
101  const NodeProperty< Size >& modalities() const;
102 
104  private:
106  void __buildGraph(const PRM< GUM_SCALAR >& prm);
107 
110  const PRMClassElement< GUM_SCALAR >& elt);
111 
113  void
115  NodeId node,
117 
120 
127 
134 
136  typedef HashTable<
140 
145  };
146 
147 
148 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
149  extern template class ClassDependencyGraph< double >;
150 #endif
151 
152  } /* namespace prm */
153 } /* namespace gum */
154 
156 
157 #endif /* GUM_ClassDependencyGraph_H */
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
const DAG & dag() const
Returns a constant reference over the graph of the DAG representing the ClassDependencyGraph<GUM_SCAL...
Abstract class representing an element of PRM class.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
NodeMap __node_map
Map each Class to a HashTable mapping the Class&#39;s ClassElements to their assigned NodeId in __graph...
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
ClassDependencyGraph(const PRM< GUM_SCALAR > &prm)
Default constructor.
The class for generic Hash Tables.
Definition: hashTable.h:679
std::pair< const PRMClassElementContainer< GUM_SCALAR > *, const PRMClassElement< GUM_SCALAR > *> EltPair
Association between a class element and it&#39;s holding class.
NodeProperty< Size > __modalitites
The modalities map for each node in the ClassDependencyGraph<GUM_SCALAR>. This is useful when using a...
void __buildGraph(const PRM< GUM_SCALAR > &prm)
Build the class dependency graph.
This class represent the dependencies of all classes in a PRM<GUM_SCALAR>.
void __addNode(const PRMClassElementContainer< GUM_SCALAR > *c, const PRMClassElement< GUM_SCALAR > &elt)
Add nodes in __graph while updating consequently all the mappings.
This class represents a Probabilistic Relational PRMSystem<GUM_SCALAR>.
Definition: PRM.h:66
<agrum/PRM/classElementContainer.h>
HashTable< const PRMClassElementContainer< GUM_SCALAR > *, HashTable< const PRMClassElement< GUM_SCALAR > *, NodeId > *> NodeMap
Code shortcut.
void __addArcs(const PRMClassElementContainer< GUM_SCALAR > &c, NodeId node, HashTable< const PRMClassElement< GUM_SCALAR > *, NodeId > &map)
Add arcs in __graph.
const NodeProperty< Size > & modalities() const
Returns a mapping between the ClassDependencyGraph<GUM_SCALAR>&#39;s nodes and their modalities.
Base class for dag.
Definition: DAG.h:102
Size NodeId
Type for node ids.
Definition: graphElements.h:98
NodeProperty< EltPair *> __elt_map
Mapping between the nodes in __graph with the PRMClassElement<GUM_SCALAR> in the PRM<GUM_SCALAR>.