55 template <
typename GUM_SCALAR >
67 template <
typename GUM_SCALAR >
70 for (
const auto ci:
prm.classes()) {
73 for (
const auto node: ci->containerDag().nodes())
77 for (
const auto ii:
prm.interfaces()) {
80 for (
const auto node: ii->containerDag().nodes()) {
86 for (
const auto cc:
prm.classes())
87 for (
const auto node: cc->containerDag().nodes())
92 template <
typename GUM_SCALAR >
97 switch (c.
get(node).elt_type()) {
122 template <
typename GUM_SCALAR >
128 template <
typename GUM_SCALAR >
141 template <
typename GUM_SCALAR >
146 template <
typename GUM_SCALAR >
152 template <
typename GUM_SCALAR >
159 template <
typename GUM_SCALAR >
164 template <
typename GUM_SCALAR >
Headers of ClassDependencyGraph<GUM_SCALAR>.
NodeSet children(const NodeSet &ids) const
returns the set of children of a set of nodes
virtual Size domainSize() const =0
The class for generic Hash Tables.
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.
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>
virtual PRMClassElement< GUM_SCALAR > & get(const std::string &name)=0
Getter on a member of this PRMClassElementContainer.
virtual const DAG & containerDag() const
Returns the gum::DAG of this PRMClassElementContainer.
Abstract class representing an element of PRM class.
virtual ClassElementType elt_type() const =0
Return the type of class element this object is.
virtual PRMType & type()=0
Return a reference over the gum::PRMType of this class element.
A PRMSlotChain represents a sequence of gum::prm::PRMClassElement<GUM_SCALAR> where the n-1 first gum...
PRMClassElementContainer< GUM_SCALAR > & end()
Returns the PRMClassElement<GUM_SCALAR>Container over which this slot chain ends.
PRMClassElement< GUM_SCALAR > & lastElt()
Returns the last element of the slot chain, typically this is an gum::PRMAttribute or a gum::PRMAggre...
DiscreteVariable & variable()
Return a reference on the DiscreteVariable contained in this.
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