aGrUM  0.16.0
gum::IBayesNet< GUM_SCALAR > Class Template Referenceabstract

Class representing the minimal interface for Bayesian Network. More...

#include <agrum/BN/IBayesNet.h>

+ Inheritance diagram for gum::IBayesNet< GUM_SCALAR >:
+ Collaboration diagram for gum::IBayesNet< GUM_SCALAR >:

Public Member Functions

bool operator== (const IBayesNet< GUM_SCALAR > &from) const
 This operator compares 2 BNs ! More...
 
bool operator!= (const IBayesNet< GUM_SCALAR > &from) const
 
Size dim () const
 Returns the dimension (the number of free parameters) in this bayes net. More...
 
Size maxVarDomainSize () const
 
GUM_SCALAR minParam () const
 
GUM_SCALAR maxParam () const
 
GUM_SCALAR minNonZeroParam () const
 
GUM_SCALAR maxNonOneParam () const
 
virtual std::string toDot () const
 
std::string toString () const
 
NodeSet minimalCondSet (NodeId target, const NodeSet &soids) const
 
NodeSet minimalCondSet (const NodeSet &targets, const NodeSet &soids) const
 
double log10DomainSize () const
 
bool hasSameStructure (const DAGmodel &other)
 
Constructors / Destructors
 IBayesNet ()
 Default constructor. More...
 
 IBayesNet (std::string name)
 Default constructor. More...
 
virtual ~IBayesNet ()
 Destructor. More...
 
 IBayesNet (const IBayesNet< GUM_SCALAR > &source)
 Copy constructor. More...
 
IBayesNet< GUM_SCALAR > & operator= (const IBayesNet< GUM_SCALAR > &source)
 Copy operator. More...
 
Pure Virtual methods
virtual const Potential< GUM_SCALAR > & cpt (NodeId varId) const =0
 Returns the CPT of a variable. More...
 
virtual const VariableNodeMapvariableNodeMap () const =0
 Returns a constant reference to the VariableNodeMap of thisBN. More...
 
virtual const DiscreteVariablevariable (NodeId id) const =0
 Returns a constant reference over a variable given it's node id. More...
 
virtual NodeId nodeId (const DiscreteVariable &var) const =0
 Return id node from discrete var pointer. More...
 
virtual NodeId idFromName (const std::string &name) const =0
 Getter by name. More...
 
virtual const DiscreteVariablevariableFromName (const std::string &name) const =0
 Getter by name. More...
 
Joint Probability manipulation methods
GUM_SCALAR jointProbability (const Instantiation &i) const
 Compute a parameter of the joint probability for the BN (given an instantiation of the vars) More...
 
GUM_SCALAR log2JointProbability (const Instantiation &i) const
 Compute a parameter of the log joint probability for the BN (given an instantiation of the vars) More...
 
Getter and setters
const std::string & property (const std::string &name) const
 Return the value of the property name of this DAGModel. More...
 
const std::string & propertyWithDefault (const std::string &name, const std::string &byDefault) const
 Return the value of the property name of this DAGModel. More...
 
void setProperty (const std::string &name, const std::string &value)
 Add or change a property of this DAGModel. More...
 
Variable manipulation methods.
const DAGdag () const
 Returns a constant reference to the dag of this Bayes Net. More...
 
Size size () const
 Returns the number of variables in this Directed Graphical Model. More...
 
Size sizeArcs () const
 Returns the number of arcs in this Directed Graphical Model. More...
 
bool empty () const
 Retursn true if this Directed Graphical Model is empty. More...
 
const NodeGraphPartnodes () const
 Returns a constant reference to the dag of this Bayes Net. More...
 
virtual Instantiation completeInstantiation () const final
 Get an instantiation over all the variables of the model. More...
 
Arc manipulation methods.
const ArcSetarcs () const
 returns the set of nodes with arc ingoing to a given node More...
 
const NodeSetparents (const NodeId id) const
 returns the set of nodes with arc ingoing to a given node More...
 
const NodeSetparents (const std::string &name) const
 returns the set of nodes with arc ingoing to a given node More...
 
const NodeSetchildren (const NodeId id) const
 returns the set of nodes with arc outgoing from a given node More...
 
const NodeSetchildren (const std::string &name) const
 returns the set of nodes with arc ingoing to a given node More...
 
Graphical methods
const UndiGraphmoralGraph (bool clear=true) const
 The node's id are coherent with the variables and nodes of the topology. More...
 
const Sequence< NodeId > & topologicalOrder (bool clear=true) const
 The topological order stays the same as long as no variable or arcs are added or erased src the topology. More...
 

Protected Attributes

DAG _dag
 The DAG of this Directed Graphical Model. More...
 

Detailed Description

template<typename GUM_SCALAR>
class gum::IBayesNet< GUM_SCALAR >

Class representing the minimal interface for Bayesian Network.

This class is used as a base class for different versions of Bayesian Networks. No data (except the dag herited from DAGmodel are included in this class. Many algorithms (inference for instance) may use this class when a simple BN is needed.

Definition at line 62 of file IBayesNet.h.

Constructor & Destructor Documentation

◆ IBayesNet() [1/3]

template<typename GUM_SCALAR >
INLINE gum::IBayesNet< GUM_SCALAR >::IBayesNet ( )

Default constructor.

Definition at line 49 of file IBayesNet_tpl.h.

49  : DAGmodel() {
50  GUM_CONSTRUCTOR(IBayesNet);
51  }
DAGmodel()
Default constructor.
Definition: DAGmodel.cpp:30
IBayesNet()
Default constructor.
Definition: IBayesNet_tpl.h:49

◆ IBayesNet() [2/3]

template<typename GUM_SCALAR >
INLINE gum::IBayesNet< GUM_SCALAR >::IBayesNet ( std::string  name)
explicit

Default constructor.

Definition at line 54 of file IBayesNet_tpl.h.

54  : DAGmodel() {
55  GUM_CONSTRUCTOR(IBayesNet);
56  this->setProperty("name", name);
57  }
void setProperty(const std::string &name, const std::string &value)
Add or change a property of this DAGModel.
Definition: DAGmodel_inl.h:56
DAGmodel()
Default constructor.
Definition: DAGmodel.cpp:30
IBayesNet()
Default constructor.
Definition: IBayesNet_tpl.h:49

◆ ~IBayesNet()

template<typename GUM_SCALAR >
gum::IBayesNet< GUM_SCALAR >::~IBayesNet ( )
virtual

Destructor.

Definition at line 74 of file IBayesNet_tpl.h.

74  {
75  GUM_DESTRUCTOR(IBayesNet);
76  }
IBayesNet()
Default constructor.
Definition: IBayesNet_tpl.h:49

◆ IBayesNet() [3/3]

template<typename GUM_SCALAR>
gum::IBayesNet< GUM_SCALAR >::IBayesNet ( const IBayesNet< GUM_SCALAR > &  source)

Copy constructor.

Definition at line 60 of file IBayesNet_tpl.h.

60  :
61  DAGmodel(source) {
62  GUM_CONS_CPY(IBayesNet);
63  }
DAGmodel()
Default constructor.
Definition: DAGmodel.cpp:30
IBayesNet()
Default constructor.
Definition: IBayesNet_tpl.h:49

Member Function Documentation

◆ __minimalCondSetVisitDn()

template<typename GUM_SCALAR >
void gum::IBayesNet< GUM_SCALAR >::__minimalCondSetVisitDn ( NodeId  node,
const NodeSet soids,
NodeSet minimal,
NodeSet alreadyVisitedUp,
NodeSet alreadyVisitedDn 
) const
private

Definition at line 332 of file IBayesNet_tpl.h.

337  {
338  if (alreadyVisitedDn.contains(node)) return;
339  alreadyVisitedDn << node;
340 
341  if (soids.contains(node)) {
342  minimal << node;
343  for (auto fath : _dag.parents(node))
345  fath, soids, minimal, alreadyVisitedUp, alreadyVisitedDn);
346  } else {
347  for (auto chil : _dag.children(node))
349  chil, soids, minimal, alreadyVisitedUp, alreadyVisitedDn);
350  }
351  }
DAG _dag
The DAG of this Directed Graphical Model.
Definition: DAGmodel.h:203
const NodeSet & parents(const NodeId id) const
returns the set of nodes with arc ingoing to a given node
void __minimalCondSetVisitUp(NodeId node, const NodeSet &soids, NodeSet &minimal, NodeSet &alreadyVisitedUp, NodeSet &alreadyVisitedDn) const
const NodeSet & children(const NodeId id) const
returns the set of nodes with arc outgoing from a given node
void __minimalCondSetVisitDn(NodeId node, const NodeSet &soids, NodeSet &minimal, NodeSet &alreadyVisitedUp, NodeSet &alreadyVisitedDn) const

◆ __minimalCondSetVisitUp()

template<typename GUM_SCALAR >
void gum::IBayesNet< GUM_SCALAR >::__minimalCondSetVisitUp ( NodeId  node,
const NodeSet soids,
NodeSet minimal,
NodeSet alreadyVisitedUp,
NodeSet alreadyVisitedDn 
) const
private

Definition at line 309 of file IBayesNet_tpl.h.

314  {
315  if (alreadyVisitedUp.contains(node)) return;
316  alreadyVisitedUp << node;
317 
318  if (soids.contains(node)) {
319  minimal << node;
320  } else {
321  for (auto fath : _dag.parents(node))
323  fath, soids, minimal, alreadyVisitedUp, alreadyVisitedDn);
324  for (auto chil : _dag.children(node))
326  chil, soids, minimal, alreadyVisitedUp, alreadyVisitedDn);
327  }
328  }
DAG _dag
The DAG of this Directed Graphical Model.
Definition: DAGmodel.h:203
const NodeSet & parents(const NodeId id) const
returns the set of nodes with arc ingoing to a given node
void __minimalCondSetVisitUp(NodeId node, const NodeSet &soids, NodeSet &minimal, NodeSet &alreadyVisitedUp, NodeSet &alreadyVisitedDn) const
const NodeSet & children(const NodeId id) const
returns the set of nodes with arc outgoing from a given node
void __minimalCondSetVisitDn(NodeId node, const NodeSet &soids, NodeSet &minimal, NodeSet &alreadyVisitedUp, NodeSet &alreadyVisitedDn) const

◆ arcs()

INLINE const ArcSet & gum::DAGmodel::arcs ( ) const
inherited

returns the set of nodes with arc ingoing to a given node

Note that the set of arcs returned may be empty if no arc within the ArcGraphPart is ingoing into the given node.

Parameters
idthe node toward which the arcs returned are pointing

Definition at line 104 of file DAGmodel_inl.h.

References gum::DAGmodel::_dag, and gum::ArcGraphPart::arcs().

Referenced by gum::EssentialGraph::__buildEssentialGraph(), gum::DAGmodel::__moralGraph(), gum::MarkovBlanket::hasSameStructure(), and gum::DAGmodel::hasSameStructure().

104 { return _dag.arcs(); }
DAG _dag
The DAG of this Directed Graphical Model.
Definition: DAGmodel.h:203
const ArcSet & arcs() const
returns the set of arcs stored within the ArcGraphPart
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ children() [1/2]

INLINE const NodeSet & gum::DAGmodel::children ( const NodeId  id) const
inherited

returns the set of nodes with arc outgoing from a given node

Note that the set of arcs returned may be empty if no arc within the ArcGraphPart is outgoing from the given node.

Parameters
idthe node which is the tail of the arcs returned

Definition at line 111 of file DAGmodel_inl.h.

References gum::DAGmodel::_dag, and gum::ArcGraphPart::children().

Referenced by gum::MarkovBlanket::__buildMarkovBlanket(), gum::DAGmodel::parents(), gum::prm::InstanceBayesNet< GUM_SCALAR >::toDot(), and gum::prm::ClassBayesNet< GUM_SCALAR >::toDot().

111  {
112  return _dag.children(id);
113  }
DAG _dag
The DAG of this Directed Graphical Model.
Definition: DAGmodel.h:203
const NodeSet & children(const NodeId id) const
returns the set of nodes with arc outgoing from a given node
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ children() [2/2]

const NodeSet& gum::DAGmodel::children ( const std::string &  name) const
inlineinherited

returns the set of nodes with arc ingoing to a given node

Note that the set of arcs returned may be empty if no arc within the ArcGraphPart is ingoing into the given node.

Parameters
idthe node toward which the arcs returned are pointing

Definition at line 165 of file DAGmodel.h.

References gum::DAGmodel::hasSameStructure(), gum::DAGmodel::idFromName(), gum::DAGmodel::log10DomainSize(), gum::DAGmodel::moralGraph(), gum::DAGmodel::operator=(), gum::DAGmodel::parents(), and gum::DAGmodel::topologicalOrder().

165  {
166  return parents(idFromName(name));
167  };
const NodeSet & parents(const NodeId id) const
returns the set of nodes with arc ingoing to a given node
Definition: DAGmodel_inl.h:106
virtual NodeId idFromName(const std::string &name) const =0
Getter by name.
+ Here is the call graph for this function:

◆ completeInstantiation()

INLINE Instantiation gum::DAGmodel::completeInstantiation ( ) const
finalvirtualinherited

Get an instantiation over all the variables of the model.

Definition at line 86 of file DAGmodel_inl.h.

References gum::DAGmodel::dag(), and gum::DAGmodel::variable().

86  {
87  Instantiation I;
88 
89  for (const auto node : dag())
90  I << variable(node);
91 
92  return I;
93  }
virtual const DiscreteVariable & variable(NodeId id) const =0
Returns a constant reference over a variabe given it&#39;s node id.
const DAG & dag() const
Returns a constant reference to the dag of this Bayes Net.
Definition: DAGmodel_inl.h:63
+ Here is the call graph for this function:

◆ cpt()

template<typename GUM_SCALAR>
virtual const Potential< GUM_SCALAR >& gum::IBayesNet< GUM_SCALAR >::cpt ( NodeId  varId) const
pure virtual

Returns the CPT of a variable.

Exceptions
NotFoundIf no variable's id matches varId.

Implemented in gum::BayesNet< GUM_SCALAR >, gum::BayesNet< double >, gum::BayesNetFragment< GUM_SCALAR >, gum::prm::ClassBayesNet< GUM_SCALAR >, and gum::prm::InstanceBayesNet< GUM_SCALAR >.

Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__verticesSampling(), gum::BarrenNodesFinder::barrenPotentials(), and gum::IBayesNet< double >::operator==().

+ Here is the caller graph for this function:

◆ dag()

◆ dim()

template<typename GUM_SCALAR >
Size gum::IBayesNet< GUM_SCALAR >::dim ( ) const

Returns the dimension (the number of free parameters) in this bayes net.

\( dim(G)=\sum_{i \in nodes} ((r_i-1)\cdot q_i) \) where \( r_i \) is the number of instantiations of node \( i \) and \( q_i \) is the number of instantiations of its parents.

Definition at line 79 of file IBayesNet_tpl.h.

79  {
80  Size dim = 0;
81 
82  for (auto node : nodes()) {
83  Size q = 1;
84 
85  for (auto parent : parents(node))
86  q *= variable(parent).domainSize();
87 
88  dim += (variable(node).domainSize() - 1) * q;
89  }
90 
91  return dim;
92  }
const NodeSet & parents(const NodeId id) const
returns the set of nodes with arc ingoing to a given node
Definition: DAGmodel_inl.h:106
virtual Size domainSize() const =0
virtual const DiscreteVariable & variable(NodeId id) const =0
Returns a constant reference over a variable given it&#39;s node id.
const NodeGraphPart & nodes() const
Returns a constant reference to the dag of this Bayes Net.
Definition: DAGmodel_inl.h:115
Size dim() const
Returns the dimension (the number of free parameters) in this bayes net.
Definition: IBayesNet_tpl.h:79
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Definition: types.h:48

◆ empty()

INLINE bool gum::DAGmodel::empty ( ) const
inherited

Retursn true if this Directed Graphical Model is empty.

Definition at line 99 of file DAGmodel_inl.h.

References gum::DAGmodel::size().

99 { return size() == 0; }
Size size() const
Returns the number of variables in this Directed Graphical Model.
Definition: DAGmodel_inl.h:96
+ Here is the call graph for this function:

◆ hasSameStructure()

bool gum::DAGmodel::hasSameStructure ( const DAGmodel other)
inherited
Returns
true if all the named node are the same and all the named arcs are the same

Definition at line 121 of file DAGmodel.cpp.

References gum::DAGmodel::arcs(), gum::Set< Key, Alloc >::exists(), gum::DAGmodel::idFromName(), gum::DAGmodel::nodes(), gum::DAGmodel::size(), gum::DAGmodel::sizeArcs(), and gum::DAGmodel::variable().

Referenced by gum::DAGmodel::children().

121  {
122  if (this == &other) return true;
123 
124  if (size() != other.size()) return false;
125 
126  if (sizeArcs() != other.sizeArcs()) return false;
127 
128  for (const auto& nid : nodes()) {
129  try {
130  other.idFromName(variable(nid).name());
131  } catch (NotFound) { return false; }
132  }
133 
134  for (const auto& arc : arcs()) {
135  if (!other.arcs().exists(Arc(other.idFromName(variable(arc.tail()).name()),
136  other.idFromName(variable(arc.head()).name()))))
137  return false;
138  }
139 
140  return true;
141  }
const ArcSet & arcs() const
returns the set of nodes with arc ingoing to a given node
Definition: DAGmodel_inl.h:104
Size sizeArcs() const
Returns the number of arcs in this Directed Graphical Model.
Definition: DAGmodel_inl.h:102
Size size() const
Returns the number of variables in this Directed Graphical Model.
Definition: DAGmodel_inl.h:96
const NodeGraphPart & nodes() const
Returns a constant reference to the dag of this Bayes Net.
Definition: DAGmodel_inl.h:115
virtual const DiscreteVariable & variable(NodeId id) const =0
Returns a constant reference over a variabe given it&#39;s node id.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ idFromName()

template<typename GUM_SCALAR>
virtual NodeId gum::IBayesNet< GUM_SCALAR >::idFromName ( const std::string &  name) const
pure virtual

Getter by name.

Exceptions
NotFoundif no such name exists in the graph.

Implements gum::DAGmodel.

Implemented in gum::BayesNet< GUM_SCALAR >, gum::BayesNet< double >, gum::BayesNetFragment< GUM_SCALAR >, gum::prm::ClassBayesNet< GUM_SCALAR >, and gum::prm::InstanceBayesNet< GUM_SCALAR >.

Referenced by gum::IBayesNet< double >::operator==().

+ Here is the caller graph for this function:

◆ jointProbability()

template<typename GUM_SCALAR >
GUM_SCALAR gum::IBayesNet< GUM_SCALAR >::jointProbability ( const Instantiation i) const

Compute a parameter of the joint probability for the BN (given an instantiation of the vars)

Warning
a variable not present in the instantiation is assumed to be instantiated to 0.

Definition at line 220 of file IBayesNet_tpl.h.

220  {
221  auto value = (GUM_SCALAR)1.0;
222 
223  GUM_SCALAR tmp;
224 
225  for (auto node : nodes()) {
226  if ((tmp = cpt(node)[i]) == (GUM_SCALAR)0) { return (GUM_SCALAR)0; }
227 
228  value *= tmp;
229  }
230 
231  return value;
232  }
virtual const Potential< GUM_SCALAR > & cpt(NodeId varId) const =0
Returns the CPT of a variable.
const NodeGraphPart & nodes() const
Returns a constant reference to the dag of this Bayes Net.
Definition: DAGmodel_inl.h:115

◆ log10DomainSize()

INLINE double gum::DAGmodel::log10DomainSize ( ) const
inherited
Returns
Returns the log10 domain size of the joint probabilty for the Directed Graphical Model

Definition at line 75 of file DAGmodel_inl.h.

References gum::DAGmodel::nodes(), and gum::DAGmodel::variable().

Referenced by gum::DAGmodel::children(), and gum::InfluenceDiagram< GUM_SCALAR >::toString().

75  {
76  double dSize = 0.0;
77 
78  for (const auto node : nodes()) {
79  dSize += std::log10(variable(node).domainSize());
80  }
81 
82  return dSize;
83  }
const NodeGraphPart & nodes() const
Returns a constant reference to the dag of this Bayes Net.
Definition: DAGmodel_inl.h:115
virtual const DiscreteVariable & variable(NodeId id) const =0
Returns a constant reference over a variabe given it&#39;s node id.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ log2JointProbability()

template<typename GUM_SCALAR >
GUM_SCALAR gum::IBayesNet< GUM_SCALAR >::log2JointProbability ( const Instantiation i) const

Compute a parameter of the log joint probability for the BN (given an instantiation of the vars)

Compute a parameter of the joint probability for the BN (given an instantiation of the vars)

Warning
a variable not present in the instantiation is assumed to be instantiated to 0.

Definition at line 239 of file IBayesNet_tpl.h.

239  {
240  auto value = (GUM_SCALAR)0.0;
241 
242  GUM_SCALAR tmp;
243 
244  for (auto node : nodes()) {
245  if ((tmp = cpt(node)[i]) == (GUM_SCALAR)0) {
246  return (GUM_SCALAR)(-std::numeric_limits< double >::infinity());
247  }
248 
249  value += log2(cpt(node)[i]);
250  }
251 
252  return value;
253  }
virtual const Potential< GUM_SCALAR > & cpt(NodeId varId) const =0
Returns the CPT of a variable.
const NodeGraphPart & nodes() const
Returns a constant reference to the dag of this Bayes Net.
Definition: DAGmodel_inl.h:115

◆ maxNonOneParam()

template<typename GUM_SCALAR >
GUM_SCALAR gum::IBayesNet< GUM_SCALAR >::maxNonOneParam ( ) const
Returns
the biggest value (not equal to 1) in the CPTs of *this

Definition at line 135 of file IBayesNet_tpl.h.

135  {
136  GUM_SCALAR res = 0.0;
137  for (auto node : nodes()) {
138  auto v = cpt(node).maxNonOne();
139  if (v > res) { res = v; }
140  }
141  return res;
142  }
virtual const Potential< GUM_SCALAR > & cpt(NodeId varId) const =0
Returns the CPT of a variable.
const NodeGraphPart & nodes() const
Returns a constant reference to the dag of this Bayes Net.
Definition: DAGmodel_inl.h:115

◆ maxParam()

template<typename GUM_SCALAR >
GUM_SCALAR gum::IBayesNet< GUM_SCALAR >::maxParam ( ) const
Returns
the biggest value in the CPTs of *this

Definition at line 115 of file IBayesNet_tpl.h.

115  {
116  GUM_SCALAR res = 1.0;
117  for (auto node : nodes()) {
118  auto v = cpt(node).max();
119  if (v > res) { res = v; }
120  }
121  return res;
122  }
virtual const Potential< GUM_SCALAR > & cpt(NodeId varId) const =0
Returns the CPT of a variable.
const NodeGraphPart & nodes() const
Returns a constant reference to the dag of this Bayes Net.
Definition: DAGmodel_inl.h:115

◆ maxVarDomainSize()

template<typename GUM_SCALAR >
Size gum::IBayesNet< GUM_SCALAR >::maxVarDomainSize ( ) const
Returns
the biggest domainSize among the variables of *this

Definition at line 95 of file IBayesNet_tpl.h.

Referenced by gum::ImportanceSampling< GUM_SCALAR >::_onContextualize().

95  {
96  Size res = 0;
97  for (auto node : nodes()) {
98  auto v = variable(node).domainSize();
99  if (v > res) { res = v; }
100  }
101  return res;
102  }
virtual Size domainSize() const =0
virtual const DiscreteVariable & variable(NodeId id) const =0
Returns a constant reference over a variable given it&#39;s node id.
const NodeGraphPart & nodes() const
Returns a constant reference to the dag of this Bayes Net.
Definition: DAGmodel_inl.h:115
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Definition: types.h:48
+ Here is the caller graph for this function:

◆ minimalCondSet() [1/2]

template<typename GUM_SCALAR >
NodeSet gum::IBayesNet< GUM_SCALAR >::minimalCondSet ( NodeId  target,
const NodeSet soids 
) const

Definition at line 355 of file IBayesNet_tpl.h.

356  {
357  if (soids.contains(target)) return NodeSet({target});
358 
359  NodeSet res;
360  NodeSet alreadyVisitedUp;
361  NodeSet alreadyVisitedDn;
362  alreadyVisitedDn << target;
363  alreadyVisitedUp << target;
364 
365  for (auto fath : _dag.parents(target))
367  fath, soids, res, alreadyVisitedUp, alreadyVisitedDn);
368  for (auto chil : _dag.children(target))
370  chil, soids, res, alreadyVisitedUp, alreadyVisitedDn);
371  return res;
372  }
Set< NodeId > NodeSet
Some typdefs and define for shortcuts ...
DAG _dag
The DAG of this Directed Graphical Model.
Definition: DAGmodel.h:203
const NodeSet & parents(const NodeId id) const
returns the set of nodes with arc ingoing to a given node
void __minimalCondSetVisitUp(NodeId node, const NodeSet &soids, NodeSet &minimal, NodeSet &alreadyVisitedUp, NodeSet &alreadyVisitedDn) const
const NodeSet & children(const NodeId id) const
returns the set of nodes with arc outgoing from a given node
void __minimalCondSetVisitDn(NodeId node, const NodeSet &soids, NodeSet &minimal, NodeSet &alreadyVisitedUp, NodeSet &alreadyVisitedDn) const

◆ minimalCondSet() [2/2]

template<typename GUM_SCALAR >
NodeSet gum::IBayesNet< GUM_SCALAR >::minimalCondSet ( const NodeSet targets,
const NodeSet soids 
) const

Definition at line 375 of file IBayesNet_tpl.h.

376  {
377  NodeSet res;
378  for (auto node : targets) {
379  res += minimalCondSet(node, soids);
380  }
381  return res;
382  }
Set< NodeId > NodeSet
Some typdefs and define for shortcuts ...
NodeSet minimalCondSet(NodeId target, const NodeSet &soids) const

◆ minNonZeroParam()

template<typename GUM_SCALAR >
GUM_SCALAR gum::IBayesNet< GUM_SCALAR >::minNonZeroParam ( ) const
Returns
the smallest value (not equal to 0) in the CPTs of *this

Definition at line 125 of file IBayesNet_tpl.h.

Referenced by gum::ImportanceSampling< GUM_SCALAR >::_onContextualize().

125  {
126  GUM_SCALAR res = 1.0;
127  for (auto node : nodes()) {
128  auto v = cpt(node).minNonZero();
129  if (v < res) { res = v; }
130  }
131  return res;
132  }
virtual const Potential< GUM_SCALAR > & cpt(NodeId varId) const =0
Returns the CPT of a variable.
const NodeGraphPart & nodes() const
Returns a constant reference to the dag of this Bayes Net.
Definition: DAGmodel_inl.h:115
+ Here is the caller graph for this function:

◆ minParam()

template<typename GUM_SCALAR >
GUM_SCALAR gum::IBayesNet< GUM_SCALAR >::minParam ( ) const
Returns
the smallest value in the CPTs of *this

Definition at line 105 of file IBayesNet_tpl.h.

105  {
106  GUM_SCALAR res = 1.0;
107  for (auto node : nodes()) {
108  auto v = cpt(node).min();
109  if (v < res) { res = v; }
110  }
111  return res;
112  }
virtual const Potential< GUM_SCALAR > & cpt(NodeId varId) const =0
Returns the CPT of a variable.
const NodeGraphPart & nodes() const
Returns a constant reference to the dag of this Bayes Net.
Definition: DAGmodel_inl.h:115

◆ moralGraph()

const UndiGraph & gum::DAGmodel::moralGraph ( bool  clear = true) const
inherited

The node's id are coherent with the variables and nodes of the topology.

Parameters
clearIf false returns the previously created moral graph.

Definition at line 101 of file DAGmodel.cpp.

References gum::DAGmodel::__moralGraph(), gum::DAGmodel::__mutableMoralGraph, and gum::UndiGraph::clear().

Referenced by gum::prm::SVED< GUM_SCALAR >::__eliminateNodes(), gum::prm::SVE< GUM_SCALAR >::__eliminateNodes(), gum::prm::SVED< GUM_SCALAR >::__eliminateNodesWithEvidence(), gum::prm::SVE< GUM_SCALAR >::__eliminateNodesWithEvidence(), gum::prm::SVED< GUM_SCALAR >::__initLiftedNodes(), gum::prm::SVE< GUM_SCALAR >::__initLiftedNodes(), and gum::DAGmodel::children().

101  {
102  if (clear
103  || (__mutableMoralGraph == nullptr)) { // we have to call _moralGraph
104  if (__mutableMoralGraph == nullptr) {
105  __mutableMoralGraph = new UndiGraph();
106  } else {
107  // clear is True ,__mutableMoralGraph exists
109  }
110 
111  __moralGraph();
112  }
113 
114  return *__mutableMoralGraph;
115  }
virtual void clear()
removes all the nodes and edges from the graph
Definition: undiGraph_inl.h:43
UndiGraph * __mutableMoralGraph
The moral graph of this Directed Graphical Model.
Definition: DAGmodel.h:211
void __moralGraph() const
Returns the moral graph of this DAGModel.
Definition: DAGmodel.cpp:53
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nodeId()

template<typename GUM_SCALAR>
virtual NodeId gum::IBayesNet< GUM_SCALAR >::nodeId ( const DiscreteVariable var) const
pure virtual

Return id node from discrete var pointer.

Exceptions
NotFoundIf no variable matches var.

Implements gum::DAGmodel.

Implemented in gum::BayesNet< GUM_SCALAR >, gum::BayesNet< double >, gum::BayesNetFragment< GUM_SCALAR >, gum::prm::ClassBayesNet< GUM_SCALAR >, and gum::prm::InstanceBayesNet< GUM_SCALAR >.

Referenced by gum::BayesBall::relevantPotentials(), and gum::dSeparation::relevantPotentials().

+ Here is the caller graph for this function:

◆ nodes()

INLINE const NodeGraphPart & gum::DAGmodel::nodes ( ) const
inherited

Returns a constant reference to the dag of this Bayes Net.

Definition at line 115 of file DAGmodel_inl.h.

References gum::DAGmodel::_dag.

Referenced by gum::credal::CredalNet< GUM_SCALAR >::__bnCopy(), gum::EssentialGraph::__buildEssentialGraph(), gum::MarkovBlanket::__buildMarkovBlanket(), gum::DAGmodel::__moralGraph(), gum::credal::CredalNet< GUM_SCALAR >::__sort_varType(), gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__verticesSampling(), gum::ImportanceSampling< GUM_SCALAR >::_unsharpenBN(), gum::BayesNetFactory< GUM_SCALAR >::BayesNetFactory(), gum::BayesNetFragment< GUM_SCALAR >::checkConsistency(), gum::learning::DAG2BNLearner< ALLOC >::createBN(), gum::MCBayesNetGenerator< GUM_SCALAR, ICPTGenerator, ICPTDisturber >::disturbBN(), gum::Estimator< GUM_SCALAR >::Estimator(), gum::getMaxModality(), gum::DAGmodel::hasSameStructure(), gum::DAGmodel::log10DomainSize(), gum::prm::InstanceBayesNet< GUM_SCALAR >::modalities(), gum::prm::ClassBayesNet< GUM_SCALAR >::modalities(), gum::Estimator< GUM_SCALAR >::setFromBN(), gum::prm::InstanceBayesNet< GUM_SCALAR >::toDot(), gum::prm::ClassBayesNet< GUM_SCALAR >::toDot(), gum::credal::CredalNet< GUM_SCALAR >::toString(), and gum::BayesNetFragment< GUM_SCALAR >::~BayesNetFragment().

115  {
116  return (NodeGraphPart&)_dag;
117  }
DAG _dag
The DAG of this Directed Graphical Model.
Definition: DAGmodel.h:203
+ Here is the caller graph for this function:

◆ operator!=()

template<typename GUM_SCALAR>
bool gum::IBayesNet< GUM_SCALAR >::operator!= ( const IBayesNet< GUM_SCALAR > &  from) const
Returns
Returns false if the src and this are equal.

Definition at line 303 of file IBayesNet_tpl.h.

303  {
304  return !this->operator==(from);
305  }
bool operator==(const IBayesNet< GUM_SCALAR > &from) const
This operator compares 2 BNs !

◆ operator=()

template<typename GUM_SCALAR>
IBayesNet< GUM_SCALAR > & gum::IBayesNet< GUM_SCALAR >::operator= ( const IBayesNet< GUM_SCALAR > &  source)

Copy operator.

Definition at line 67 of file IBayesNet_tpl.h.

Referenced by gum::prm::InstanceBayesNet< GUM_SCALAR >::operator=(), and gum::prm::ClassBayesNet< GUM_SCALAR >::operator=().

67  {
68  if (this != &source) { DAGmodel::operator=(source); }
69 
70  return *this;
71  }
DAGmodel & operator=(const DAGmodel &source)
Private copy operator.
Definition: DAGmodel.cpp:78
+ Here is the caller graph for this function:

◆ operator==()

template<typename GUM_SCALAR>
bool gum::IBayesNet< GUM_SCALAR >::operator== ( const IBayesNet< GUM_SCALAR > &  from) const

This operator compares 2 BNs !

Warning
To identify nodes between BNs, it is assumed that they share the same name.
Returns
true if the src and this are equal.

Definition at line 256 of file IBayesNet_tpl.h.

256  {
257  if (size() != from.size()) { return false; }
258 
259  if (sizeArcs() != from.sizeArcs()) { return false; }
260 
261  // alignment of variables between the 2 BNs
262  Bijection< const DiscreteVariable*, const DiscreteVariable* > alignment;
263 
264  for (auto node : nodes()) {
265  try {
266  alignment.insert(&variable(node),
267  &from.variableFromName(variable(node).name()));
268  } catch (NotFound&) {
269  // a name is not found in from
270  return false;
271  }
272  }
273 
274  for (auto node : nodes()) {
275  NodeId fromnode = from.idFromName(variable(node).name());
276 
277  if (cpt(node).nbrDim() != from.cpt(fromnode).nbrDim()) { return false; }
278 
279  if (cpt(node).domainSize() != from.cpt(fromnode).domainSize()) {
280  return false;
281  }
282 
283  Instantiation i(cpt(node));
284  Instantiation j(from.cpt(fromnode));
285 
286  for (i.setFirst(); !i.end(); i.inc()) {
287  for (Idx indice = 0; indice < cpt(node).nbrDim(); ++indice) {
288  const DiscreteVariable* p = &(i.variable(indice));
289  j.chgVal(*(alignment.second(p)), i.val(*p));
290  }
291 
292  if (std::pow(cpt(node).get(i) - from.cpt(fromnode).get(j), (GUM_SCALAR)2)
293  > (GUM_SCALAR)1e-6) {
294  return false;
295  }
296  }
297  }
298 
299  return true;
300  }
Size sizeArcs() const
Returns the number of arcs in this Directed Graphical Model.
Definition: DAGmodel_inl.h:102
virtual const Potential< GUM_SCALAR > & cpt(NodeId varId) const =0
Returns the CPT of a variable.
Size size() const
Returns the number of variables in this Directed Graphical Model.
Definition: DAGmodel_inl.h:96
virtual const DiscreteVariable & variable(NodeId id) const =0
Returns a constant reference over a variable given it&#39;s node id.
const NodeGraphPart & nodes() const
Returns a constant reference to the dag of this Bayes Net.
Definition: DAGmodel_inl.h:115
Size NodeId
Type for node ids.
Definition: graphElements.h:98

◆ parents() [1/2]

INLINE const NodeSet & gum::DAGmodel::parents ( const NodeId  id) const
inherited

returns the set of nodes with arc ingoing to a given node

Note that the set of arcs returned may be empty if no arc within the ArcGraphPart is ingoing into the given node.

Parameters
idthe node toward which the arcs returned are pointing

Definition at line 106 of file DAGmodel_inl.h.

References gum::DAGmodel::_dag, and gum::ArcGraphPart::parents().

Referenced by gum::MarkovBlanket::__buildMarkovBlanket(), gum::DAGmodel::__moralGraph(), gum::BayesNetFragment< GUM_SCALAR >::_installCPT(), gum::BayesNetFragment< GUM_SCALAR >::checkConsistency(), gum::DAGmodel::children(), gum::BayesNetFragment< GUM_SCALAR >::installCPT(), gum::DAGmodel::parents(), gum::prm::InstanceBayesNet< GUM_SCALAR >::toDot(), and gum::prm::ClassBayesNet< GUM_SCALAR >::toDot().

106  {
107  return _dag.parents(id);
108  }
DAG _dag
The DAG of this Directed Graphical Model.
Definition: DAGmodel.h:203
const NodeSet & parents(const NodeId id) const
returns the set of nodes with arc ingoing to a given node
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parents() [2/2]

const NodeSet& gum::DAGmodel::parents ( const std::string &  name) const
inlineinherited

returns the set of nodes with arc ingoing to a given node

Note that the set of arcs returned may be empty if no arc within the ArcGraphPart is ingoing into the given node.

Parameters
idthe node toward which the arcs returned are pointing

Definition at line 156 of file DAGmodel.h.

References gum::DAGmodel::children(), gum::DAGmodel::idFromName(), and gum::DAGmodel::parents().

156  {
157  return parents(idFromName(name));
158  };
const NodeSet & parents(const NodeId id) const
returns the set of nodes with arc ingoing to a given node
Definition: DAGmodel_inl.h:106
virtual NodeId idFromName(const std::string &name) const =0
Getter by name.
+ Here is the call graph for this function:

◆ property()

INLINE const std::string & gum::DAGmodel::property ( const std::string &  name) const
inherited

Return the value of the property name of this DAGModel.

Exceptions
NotFoundRaised if no name property is found.

Definition at line 37 of file DAGmodel_inl.h.

References gum::DAGmodel::__properties(), and GUM_ERROR.

Referenced by gum::InfluenceDiagram< GUM_SCALAR >::toDot().

37  {
38  try {
39  return __properties()[name];
40  } catch (NotFound&) {
41  std::string msg = "The following property does not exists: ";
42  GUM_ERROR(NotFound, msg + name);
43  }
44  }
HashTable< std::string, std::string > & __properties() const
Return the properties of this Directed Graphical Model and initialize the hash table is necessary...
Definition: DAGmodel_inl.h:66
#define GUM_ERROR(type, msg)
Definition: exceptions.h:55
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ propertyWithDefault()

INLINE const std::string & gum::DAGmodel::propertyWithDefault ( const std::string &  name,
const std::string &  byDefault 
) const
inherited

Return the value of the property name of this DAGModel.

return byDefault if the property name is not found

Definition at line 48 of file DAGmodel_inl.h.

References gum::DAGmodel::__properties().

49  {
50  try {
51  return __properties()[name];
52  } catch (NotFound&) { return byDefault; }
53  }
HashTable< std::string, std::string > & __properties() const
Return the properties of this Directed Graphical Model and initialize the hash table is necessary...
Definition: DAGmodel_inl.h:66
+ Here is the call graph for this function:

◆ setProperty()

INLINE void gum::DAGmodel::setProperty ( const std::string &  name,
const std::string &  value 
)
inherited

Add or change a property of this DAGModel.

Definition at line 56 of file DAGmodel_inl.h.

References gum::DAGmodel::__properties(), and gum::HashTable< Key, Val, Alloc >::insert().

Referenced by gum::BayesNet< double >::fastPrototype().

56  {
57  try {
58  __properties()[name] = value;
59  } catch (NotFound&) { __properties().insert(name, value); }
60  }
HashTable< std::string, std::string > & __properties() const
Return the properties of this Directed Graphical Model and initialize the hash table is necessary...
Definition: DAGmodel_inl.h:66
value_type & insert(const Key &key, const Val &val)
Adds a new element (actually a copy of this element) into the hash table.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ size()

INLINE Size gum::DAGmodel::size ( ) const
inherited

Returns the number of variables in this Directed Graphical Model.

Definition at line 96 of file DAGmodel_inl.h.

References gum::DAGmodel::dag(), and gum::NodeGraphPart::size().

Referenced by gum::credal::CredalNet< GUM_SCALAR >::__initCNNets(), gum::InfluenceDiagram< GUM_SCALAR >::decisionNodeSize(), gum::DAGmodel::empty(), gum::MarkovBlanket::hasSameStructure(), gum::DAGmodel::hasSameStructure(), gum::IBayesNet< double >::operator==(), gum::prm::InstanceBayesNet< GUM_SCALAR >::toDot(), and gum::prm::ClassBayesNet< GUM_SCALAR >::toDot().

96 { return dag().size(); }
Size size() const
alias for sizeNodes
const DAG & dag() const
Returns a constant reference to the dag of this Bayes Net.
Definition: DAGmodel_inl.h:63
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sizeArcs()

INLINE Size gum::DAGmodel::sizeArcs ( ) const
inherited

Returns the number of arcs in this Directed Graphical Model.

Definition at line 102 of file DAGmodel_inl.h.

References gum::DAGmodel::_dag, and gum::ArcGraphPart::sizeArcs().

Referenced by gum::MarkovBlanket::hasSameStructure(), gum::DAGmodel::hasSameStructure(), and gum::IBayesNet< double >::operator==().

102 { return _dag.sizeArcs(); }
DAG _dag
The DAG of this Directed Graphical Model.
Definition: DAGmodel.h:203
Size sizeArcs() const
indicates the number of arcs stored within the ArcGraphPart
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toDot()

template<typename GUM_SCALAR >
std::string gum::IBayesNet< GUM_SCALAR >::toDot ( ) const
virtual
Returns
Returns a dot representation of this IBayesNet.

Reimplemented in gum::BayesNetFragment< GUM_SCALAR >, gum::prm::ClassBayesNet< GUM_SCALAR >, and gum::prm::InstanceBayesNet< GUM_SCALAR >.

Definition at line 175 of file IBayesNet_tpl.h.

175  {
176  std::stringstream output;
177  output << "digraph \"";
178 
179  std::string bn_name;
180 
181  try {
182  bn_name = this->property("name");
183  } catch (NotFound&) { bn_name = "no_name"; }
184 
185  output << bn_name << "\" {" << std::endl;
186  output << " graph [bgcolor=transparent,label=\"" << bn_name << "\"];"
187  << std::endl;
188  output << " node [style=filled fillcolor=\"#ffffaa\"];" << std::endl
189  << std::endl;
190 
191  for (auto node : nodes())
192  output << "\"" << variable(node).name() << "\" [comment=\"" << node << ":"
193  << variable(node).toStringWithDescription() << "\"];" << std::endl;
194 
195  output << std::endl;
196 
197  std::string tab = " ";
198 
199  for (auto node : nodes()) {
200  if (children(node).size() > 0) {
201  for (auto child : children(node)) {
202  output << tab << "\"" << variable(node).name() << "\" -> "
203  << "\"" << variable(child).name() << "\";" << std::endl;
204  }
205  } else if (parents(node).size() == 0) {
206  output << tab << "\"" << variable(node).name() << "\";" << std::endl;
207  }
208  }
209 
210  output << "}" << std::endl;
211 
212  return output.str();
213  }
const NodeSet & children(const NodeId id) const
returns the set of nodes with arc outgoing from a given node
Definition: DAGmodel_inl.h:111
const NodeSet & parents(const NodeId id) const
returns the set of nodes with arc ingoing to a given node
Definition: DAGmodel_inl.h:106
const std::string toStringWithDescription() const
string version of *this using description attribute instead of name.
Size size() const
Returns the number of variables in this Directed Graphical Model.
Definition: DAGmodel_inl.h:96
virtual const DiscreteVariable & variable(NodeId id) const =0
Returns a constant reference over a variable given it&#39;s node id.
const std::string & property(const std::string &name) const
Return the value of the property name of this DAGModel.
Definition: DAGmodel_inl.h:37
const NodeGraphPart & nodes() const
Returns a constant reference to the dag of this Bayes Net.
Definition: DAGmodel_inl.h:115
const std::string & name() const
returns the name of the variable

◆ topologicalOrder()

const Sequence< NodeId > & gum::DAGmodel::topologicalOrder ( bool  clear = true) const
inherited

The topological order stays the same as long as no variable or arcs are added or erased src the topology.

Parameters
clearIf false returns the previously created topology.

Definition at line 117 of file DAGmodel.cpp.

References gum::DAGmodel::dag(), and gum::DiGraph::topologicalOrder().

Referenced by gum::EssentialGraph::__buildEssentialGraph(), gum::InfluenceDiagramGenerator< GUM_SCALAR >::__checkTemporalOrder(), gum::DAGmodel::children(), gum::InfluenceDiagram< GUM_SCALAR >::decisionOrderExists(), and gum::InfluenceDiagram< GUM_SCALAR >::getDecisionOrder().

117  {
118  return this->dag().topologicalOrder(clear);
119  }
const Sequence< NodeId > & topologicalOrder(bool clear=true) const
The topological order stays the same as long as no variable or arcs are added or erased src the topol...
Definition: diGraph.cpp:91
const DAG & dag() const
Returns a constant reference to the dag of this Bayes Net.
Definition: DAGmodel_inl.h:63
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toString()

template<typename GUM_SCALAR >
INLINE std::string gum::IBayesNet< GUM_SCALAR >::toString ( ) const
Returns
Returns a string representation of this IBayesNet.

Definition at line 145 of file IBayesNet_tpl.h.

Referenced by gum::operator<<().

145  {
146  Size param = 0;
147  double dSize = log10DomainSize();
148 
149  for (auto node : nodes())
150  param += cpt(node).content()->realSize();
151 
152  double compressionRatio = log10(1.0 * param) - dSize;
153 
154  std::stringstream s;
155  s << "BN{nodes: " << size() << ", arcs: " << dag().sizeArcs() << ", ";
156 
157  if (dSize > 6)
158  s << "domainSize: 10^" << dSize;
159  else
160  s << "domainSize: " << std::round(std::pow(10.0, dSize));
161 
162  s << ", parameters: " << param << ", compression ratio: ";
163 
164  if (compressionRatio > -3)
165  s << trunc(100.0 - std::pow(10.0, compressionRatio + 2.0));
166  else
167  s << "100-10^" << compressionRatio + 2.0;
168 
169  s << "% }";
170 
171  return s.str();
172  }
virtual const Potential< GUM_SCALAR > & cpt(NodeId varId) const =0
Returns the CPT of a variable.
Size size() const
Returns the number of variables in this Directed Graphical Model.
Definition: DAGmodel_inl.h:96
Size sizeArcs() const
indicates the number of arcs stored within the ArcGraphPart
const NodeGraphPart & nodes() const
Returns a constant reference to the dag of this Bayes Net.
Definition: DAGmodel_inl.h:115
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Definition: types.h:48
double log10DomainSize() const
Definition: DAGmodel_inl.h:75
const DAG & dag() const
Returns a constant reference to the dag of this Bayes Net.
Definition: DAGmodel_inl.h:63
+ Here is the caller graph for this function:

◆ variable()

template<typename GUM_SCALAR>
virtual const DiscreteVariable& gum::IBayesNet< GUM_SCALAR >::variable ( NodeId  id) const
pure virtual

Returns a constant reference over a variable given it's node id.

Exceptions
NotFoundIf no variable's id matches varId.

Implements gum::DAGmodel.

Implemented in gum::BayesNet< GUM_SCALAR >, gum::BayesNet< double >, gum::BayesNetFragment< GUM_SCALAR >, gum::prm::ClassBayesNet< GUM_SCALAR >, and gum::prm::InstanceBayesNet< GUM_SCALAR >.

Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__insertEvidence(), gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::__verticesSampling(), gum::Estimator< GUM_SCALAR >::Estimator(), and gum::Estimator< GUM_SCALAR >::setFromBN().

+ Here is the caller graph for this function:

◆ variableFromName()

template<typename GUM_SCALAR>
virtual const DiscreteVariable& gum::IBayesNet< GUM_SCALAR >::variableFromName ( const std::string &  name) const
pure virtual

Getter by name.

Exceptions
NotFoundif no such name exists in the graph.

Implements gum::DAGmodel.

Implemented in gum::BayesNet< GUM_SCALAR >, gum::BayesNet< double >, gum::BayesNetFragment< GUM_SCALAR >, gum::prm::ClassBayesNet< GUM_SCALAR >, and gum::prm::InstanceBayesNet< GUM_SCALAR >.

Referenced by gum::IBayesNet< double >::operator==().

+ Here is the caller graph for this function:

◆ variableNodeMap()

template<typename GUM_SCALAR>
virtual const VariableNodeMap& gum::IBayesNet< GUM_SCALAR >::variableNodeMap ( ) const
pure virtual

Member Data Documentation

◆ _dag


The documentation for this class was generated from the following files: