![]() |
aGrUM 3.3.2
a C++ library for (probabilistic) graphical models
|
Class representing the minimal interface for Bayesian network with no numerical data. More...
#include <agrum/BN/IBayesNet.h>
Public Member Functions | |
| std::vector< std::string > | check () const |
| Check if the BayesNet is consistent (variables, CPT). | |
| bool | operator== (const IBayesNet< GUM_SCALAR > &from) const |
| This operator compares 2 BNs ! | |
| Size | dim () const |
| Returns the dimension (the number of free parameters) in this bayes net. | |
| Size | maxVarDomainSize () const |
| GUM_SCALAR | minParam () const |
| GUM_SCALAR | maxParam () const |
| GUM_SCALAR | minNonZeroParam () const |
| GUM_SCALAR | maxNonOneParam () const |
| virtual std::string | toDot () const |
| virtual std::string | toDot (const dot::DotOptions &options) const |
| A dot representation of this IBayesNet, with the options given by the caller. | |
| std::string | toString () const |
| Tensor< GUM_SCALAR > | evEq (std::string_view name, double value) const |
| Tensor< GUM_SCALAR > | evIn (std::string_view name, double val1, double val2) const |
| Tensor< GUM_SCALAR > | evLt (std::string_view name, double value) const |
| Tensor< GUM_SCALAR > | evGt (std::string_view name, double value) const |
| Size | memoryFootprint () const |
| compute the (approximated) footprint in memory of the model (the footprints of CPTs) | |
| bool | hasSameStructure (const DAGmodel &other) const |
| NodeSet | minimalCondSet (NodeId target, const NodeSet &soids) const |
| NodeSet | minimalCondSet (const NodeSet &targets, const NodeSet &soids) const |
| NodeSet | minimalCondSet (std::string_view target, const std::vector< std::string > &soids) const |
| NodeSet | minimalCondSet (const std::vector< std::string > &targets, const std::vector< std::string > &soids) const |
| const DAG & | internalDag () const |
| Returns a const reference to the internal (unnamed) DAG. O(1), no copy. Use for stable references or pointers (e.g. graph listeners). For named node access, use dag() instead. | |
| double | log10DomainSize () const |
Constructors / Destructors | |
| IBayesNet () | |
| Default constructor. | |
| IBayesNet (std::string_view name) | |
| Default constructor. | |
| ~IBayesNet () override | |
| Destructor. | |
| IBayesNet (const IBayesNet< GUM_SCALAR > &source) | |
| Copy constructor. | |
| IBayesNet (IBayesNet< GUM_SCALAR > &&source) | |
| Move constructor. | |
| IBayesNet< GUM_SCALAR > & | operator= (const IBayesNet< GUM_SCALAR > &source) |
| Copy operator. | |
| IBayesNet< GUM_SCALAR > & | operator= (IBayesNet< GUM_SCALAR > &&source) |
| Move operator. | |
Pure Virtual methods | |
| virtual const Tensor< GUM_SCALAR > & | cpt (NodeId varId) const =0 |
| Returns the CPT of a variable. | |
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). | |
| GUM_SCALAR | log2JointProbability (const Instantiation &i) const |
| Compute a parameter of the log joint probability for the BN (given an instantiation of the vars). | |
Variable manipulation methods. | |
| DAG | dag () const |
| Returns a named copy of the internal DAG: each node id is assigned the name of the corresponding variable. | |
| Size | size () const final |
| Returns the number of variables in this Directed Graphical Model. | |
| Size | sizeArcs () const |
| Returns the number of arcs in this Directed Graphical Model. | |
| const NodeGraphPart & | nodes () const final |
| Returns a named copy of the internal DAG: each node id is assigned the name of the corresponding variable. | |
| bool | exists (NodeId node) const final |
| Return true if this node exists in this graphical model. | |
| bool | exists (std::string_view name) const final |
| Returns a named copy of the internal DAG: each node id is assigned the name of the corresponding variable. | |
Arc manipulation methods. | |
| const ArcSet & | arcs () const |
| return true if the arc tail->head exists in the DAGmodel | |
| bool | existsArc (const NodeId tail, const NodeId head) const |
| return true if the arc tail->head exists in the DAGmodel | |
| bool | existsArc (std::string_view nametail, std::string_view namehead) const |
| return true if the arc tail->head exists in the DAGmodel | |
| const NodeSet & | parents (const NodeId id) const |
| returns the set of nodes with arc ingoing to a given node | |
| const NodeSet & | parents (std::string_view name) const |
| return true if the arc tail->head exists in the DAGmodel | |
| NodeSet | parents (const NodeSet &ids) const |
| returns the parents of a set of nodes | |
| NodeSet | parents (const std::vector< std::string > &names) const |
| return true if the arc tail->head exists in the DAGmodel | |
| NodeSet | family (const NodeId id) const final |
| returns the parents of a node and the node | |
| NodeSet | family (std::string_view name) const final |
| return true if the arc tail->head exists in the DAGmodel | |
| const NodeSet & | children (const NodeId id) const |
| returns the set of nodes with arc outgoing from a given node | |
| const NodeSet & | children (std::string_view name) const |
| return true if the arc tail->head exists in the DAGmodel | |
| NodeSet | children (const NodeSet &ids) const |
| returns the children of a set of nodes | |
| NodeSet | children (const std::vector< std::string > &names) const |
| return true if the arc tail->head exists in the DAGmodel | |
| NodeSet | descendants (const NodeId id) const |
| returns the set of nodes with directed path outgoing from a given node | |
| NodeSet | descendants (std::string_view name) const |
| return true if the arc tail->head exists in the DAGmodel | |
| NodeSet | ancestors (const NodeId id) const |
| returns the set of nodes with directed path ingoing to a given node | |
| NodeSet | ancestors (std::string_view name) const |
| return true if the arc tail->head exists in the DAGmodel | |
Graphical methods | |
| UndiGraph | moralizedAncestralGraph (const NodeSet &nodes) const |
| build a UndiGraph by moralizing the Ancestral Graph of a set of Nodes | |
| UndiGraph | moralizedAncestralGraph (const std::vector< std::string > &nodenames) const |
| build a UndiGraph by moralizing the Ancestral Graph of a set of Nodes | |
| bool | isIndependent (NodeId X, NodeId Y, const NodeSet &Z) const final |
| check if node X and node Y are independent given nodes Z | |
| bool | isIndependent (const NodeSet &X, const NodeSet &Y, const NodeSet &Z) const final |
| check if nodes X and nodes Y are independent given nodes Z | |
| bool | isIndependent (std::string_view Xname, std::string_view Yname, const std::vector< std::string > &Znames) const |
| build a UndiGraph by moralizing the Ancestral Graph of a set of Nodes | |
| bool | isIndependent (const std::vector< std::string > &Xnames, const std::vector< std::string > &Ynames, const std::vector< std::string > &Znames) const |
| build a UndiGraph by moralizing the Ancestral Graph of a set of Nodes | |
| UndiGraph | moralGraph () const |
| The node's id are coherent with the variables and nodes of the topology. | |
| Sequence< NodeId > | topologicalOrder () const |
| The topological order stays the same as long as no variable or arcs are added or erased src the topology. | |
| NodeProperty< NodeId > | connectedComponents () const |
| Returns the weakly connected components of the underlying DAG. Each node maps to the id of its component root. | |
Variable accessor methods | |
| const VariableNodeMap & | variableNodeMap () const override |
| Returns a constant reference to the VariableNodeMap of this model. | |
| const DiscreteVariable & | variable (NodeId id) const override |
| Returns a constant reference over a variable given its node id. | |
| NodeId | nodeId (const DiscreteVariable &var) const override |
| Returns the NodeId of a variable. | |
| NodeId | idFromName (std::string_view name) const override |
| Returns the NodeId of a variable given its name. | |
| const DiscreteVariable & | variableFromName (std::string_view name) const override |
| Returns a constant reference over a variable given its name. | |
Getter and setters | |
| const std::string & | property (std::string_view name) const |
| Return the value of the property name of this GraphicalModel. | |
| const std::string & | propertyWithDefault (std::string_view name, const std::string &byDefault) const |
| Return the value of the property name of this GraphicalModel. | |
| void | setProperty (std::string_view name, std::string_view value) |
| Add or change a property of this GraphicalModel. | |
| std::vector< std::string > | properties () const |
| List of all the names of property in the Graphical model. | |
| bool | existsProperty (std::string_view name) const |
| check wether a property exists in this GraphicalModel | |
| void | updateMetaData () |
| update the meta data of this Graphical Model (version, creation date, last modification date) This method is called by the writers ONLY before writing the model to a file. | |
Variable manipulation methods. | |
| virtual bool | empty () const |
| Return true if this graphical model is empty. | |
| std::vector< std::string > | names (const std::vector< NodeId > &ids) const |
| transform a vector of NodeId in a vector of names | |
| std::vector< std::string > | names (const NodeSet &ids) const |
| transform a NodeSet in a vector of names | |
| std::vector< NodeId > | ids (const std::vector< std::string > &names) const |
| transform a vector of names into a vector of nodeId | |
| NodeSet | nodeset (const std::vector< std::string > &names) const |
| transform a vector of names into a NodeSet | |
| gum::VariableSet | variables (const std::vector< std::string > &l) const |
| transform a vector of names into a VariableeSet | |
| gum::VariableSet | variables (const NodeSet &ids) const |
| transform a vector of NodeId into a VariableeSet | |
| Instantiation | completeInstantiation () const |
| Get an instantiation over all the variables of the model. | |
Static Public Member Functions | |
| static std::string | spaceCplxToString (double dSize, int dim, Size usedMem) |
| send to the stream the space complexity with 3 parametrs | |
Protected Member Functions | |
| void | _nameNodes_ (NodeGraphPart &g) const |
| Names every node of g using variable(id).name() for each node id in g. | |
Protected Attributes | |
| DAG | dag_ |
| The DAG of this Directed Graphical Model. | |
| VariableNodeMap | varMap_ |
| Mapping between NodeIds and discrete variables. | |
Private Member Functions | |
| void | _checkNodeExists_ (NodeId id) const |
| const HashTable< std::string, std::string > & | _properties_ () const |
| Return the properties of this Directed Graphical Model. | |
Private Attributes | |
| HashTable< std::string, std::string > | _propertiesMap_ |
| The properties of this Directed Graphical Model. | |
Class representing the minimal interface for Bayesian network with no numerical data.
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 generic BN is needed.
Definition at line 79 of file IBayesNet.h.
| gum::IBayesNet< GUM_SCALAR >::IBayesNet | ( | ) |
Default constructor.
Definition at line 69 of file IBayesNet_tpl.h.
References gum::DAGmodel::DAGmodel(), and IBayesNet().
Referenced by gum::BayesNet< GUM_SCALAR >::BayesNet(), gum::BayesNet< GUM_SCALAR >::BayesNet(), gum::BayesNet< GUM_SCALAR >::BayesNet(), gum::BayesNet< GUM_SCALAR >::BayesNet(), gum::BayesNetFragment< GUM_SCALAR >::BayesNetFragment(), gum::BayesNetFragment< GUM_SCALAR >::BayesNetFragment(), gum::prm::ClassBayesNet< GUM_SCALAR >::ClassBayesNet(), gum::prm::ClassBayesNet< GUM_SCALAR >::ClassBayesNet(), IBayesNet(), IBayesNet(), IBayesNet(), IBayesNet(), gum::prm::InstanceBayesNet< GUM_SCALAR >::InstanceBayesNet(), gum::prm::InstanceBayesNet< GUM_SCALAR >::InstanceBayesNet(), ~IBayesNet(), cpt(), operator=(), operator=(), and operator==().
|
explicit |
Default constructor.
Definition at line 74 of file IBayesNet_tpl.h.
References gum::DAGmodel::DAGmodel(), IBayesNet(), and gum::GraphicalModel::setProperty().
|
override |
Destructor.
Definition at line 111 of file IBayesNet_tpl.h.
References IBayesNet().
| gum::IBayesNet< GUM_SCALAR >::IBayesNet | ( | const IBayesNet< GUM_SCALAR > & | source | ) |
Copy constructor.
Definition at line 80 of file IBayesNet_tpl.h.
References gum::DAGmodel::DAGmodel(), and IBayesNet().
| gum::IBayesNet< GUM_SCALAR >::IBayesNet | ( | IBayesNet< GUM_SCALAR > && | source | ) |
Move constructor.
Definition at line 85 of file IBayesNet_tpl.h.
References gum::DAGmodel::DAGmodel(), and IBayesNet().
|
privateinherited |
| NotFound | if id is not a node of the model |
Definition at line 83 of file DAGmodel_inl.h.
References dag_, gum::NodeGraphPart::exists(), and GUM_ERROR.
Referenced by ancestors(), children(), descendants(), family(), and parents().
|
protectedinherited |
Names every node of g using variable(id).name() for each node id in g.
Call this before returning any newly constructed graph from a model method.
Definition at line 175 of file graphicalModel_inl.h.
References gum::NodeGraphPart::setName(), and variable().
Referenced by gum::DAGmodel::dag(), family(), gum::UGmodel::graph(), and gum::DAGmodel::moralGraph().
|
privateinherited |
Return the properties of this Directed Graphical Model.
Definition at line 67 of file graphicalModel_inl.h.
References _propertiesMap_.
Referenced by property().
returns the set of nodes with directed path ingoing to a given node
Note that the set of nodes returned may be empty if no path within the ArcGraphPart is ingoing to the given node.
| id | the node which is the head of a directed path with the returned nodes |
| name | the name of the node which is the head of a directed path with the returned nodes |
| NotFound | if the node does not exist in the model |
Definition at line 167 of file DAGmodel_inl.h.
References _checkNodeExists_(), gum::DiGraph::ancestors(), dag_, and gum::Set< Key >::empty().
|
inherited |
return true if the arc tail->head exists in the DAGmodel
| tail | the nodeId (or the name) of the tail in tail->head |
| head | the nodeId (or the name) of the head in tail->head |
Definition at line 173 of file DAGmodel_inl.h.
References gum::DiGraph::ancestors(), dag_, and gum::DiscreteGraphicalModel::idFromName().
|
inherited |
return true if the arc tail->head exists in the DAGmodel
| tail | the nodeId (or the name) of the tail in tail->head |
| head | the nodeId (or the name) of the head in tail->head |
Definition at line 73 of file DAGmodel_inl.h.
References gum::ArcGraphPart::arcs(), and dag_.
Referenced by gum::EssentialGraph::_buildEssentialGraph_(), hasSameStructure(), gum::MarkovBlanket::hasSameStructure(), and gum::BayesNetFragment< GUM_SCALAR >::toBN().
| std::vector< std::string > gum::IBayesNet< GUM_SCALAR >::check | ( | ) | const |
Check if the BayesNet is consistent (variables, CPT).
A distribution is considered normalized if its sum is in [1-e, 1+e], where e is the standard tolerance of the configuration (core.epsilonStandard, 1e-6 by default). A sum that is out of this interval but in [1-c, 1+c], where c is the coarse tolerance (core.epsilonCoarse, 1e-2 by default), is reported with the hint "(normalization problem ?)".
Definition at line 320 of file IBayesNet_tpl.h.
References gum::config(), cpt(), gum::GraphicalModel::empty(), gum::Configuration::epsilonCoarse(), gum::Configuration::epsilonStandard(), gum::DAGmodel::nodes(), gum::DAGmodel::parents(), and gum::DiscreteGraphicalModel::variable().
Referenced by cpt().
returns the set of nodes with arc outgoing from a given node
Note that the set of nodes returned may be empty if no node is outgoing from the given node.
| id | the node which is the tail of an arc with the returned nodes |
| name | the name of the node which is the tail of an arc with the returned nodes |
| NotFound | if the node does not exist in the model |
Definition at line 109 of file DAGmodel_inl.h.
Referenced by gum::BayesNet< GUM_SCALAR >::erase(), gum::prm::ClassBayesNet< GUM_SCALAR >::toDot(), and gum::prm::InstanceBayesNet< GUM_SCALAR >::toDot().
returns the children of a set of nodes
| NotFound | if one of the nodes does not exist in the model |
Definition at line 119 of file DAGmodel_inl.h.
References _checkNodeExists_(), and gum::GraphicalModel::ids().
|
inherited |
return true if the arc tail->head exists in the DAGmodel
| tail | the nodeId (or the name) of the tail in tail->head |
| head | the nodeId (or the name) of the head in tail->head |
Definition at line 126 of file DAGmodel_inl.h.
References gum::ArcGraphPart::children(), dag_, gum::GraphicalModel::names(), and gum::GraphicalModel::nodeset().
|
inherited |
return true if the arc tail->head exists in the DAGmodel
| tail | the nodeId (or the name) of the tail in tail->head |
| head | the nodeId (or the name) of the head in tail->head |
Definition at line 115 of file DAGmodel_inl.h.
|
inherited |
Get an instantiation over all the variables of the model.
Definition at line 104 of file graphicalModel_inl.h.
References nodes(), and variable().
Referenced by nodes().
|
inherited |
Returns the weakly connected components of the underlying DAG. Each node maps to the id of its component root.
Definition at line 153 of file DAGmodel_inl.h.
References gum::DiGraph::connectedComponents(), and dag_.
|
pure virtual |
Returns the CPT of a variable.
| NotFound | If 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 >.
References IBayesNet(), check(), dim(), evEq(), evGt(), evIn(), evLt(), jointProbability(), log2JointProbability(), maxNonOneParam(), maxParam(), maxVarDomainSize(), memoryFootprint(), minNonZeroParam(), minParam(), operator==(), toDot(), and toString().
Referenced by gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::_verticesSampling_(), gum::BarrenNodesFinder::barrenTensors(), check(), gum::ASTposteriorProba< GUM_SCALAR >::eval(), maxNonOneParam(), maxParam(), memoryFootprint(), minParam(), and operator==().
|
nodiscardinherited |
Returns a named copy of the internal DAG: each node id is assigned the name of the corresponding variable.
O(n) — allocates a new DAG. For a stable reference (listeners, long-lived pointers), use internalDag().
Definition at line 61 of file DAGmodel_inl.h.
References gum::GraphicalModel::_nameNodes_(), and dag_.
Referenced by gum::BayesNetFragment< GUM_SCALAR >::BayesNetFragment(), gum::MarginalTargetedInference< GUM_SCALAR >::MarginalTargetedInference(), gum::BayesNet< GUM_SCALAR >::add(), gum::BayesNet< GUM_SCALAR >::reverseArc(), and gum::InfluenceDiagram< GUM_SCALAR >::toString().
returns the set of nodes with directed path outgoing from a given node
Note that the set of nodes returned may be empty if no path within the ArcGraphPart is outgoing from the given node.
| id | the node which is the tail of a directed path with the returned nodes |
| name | the name of the node which is the tail of a directed path with the returned nodes |
| NotFound | if the node does not exist in the model |
Definition at line 157 of file DAGmodel_inl.h.
References _checkNodeExists_(), dag_, gum::DiGraph::descendants(), and gum::Set< Key >::empty().
|
inherited |
return true if the arc tail->head exists in the DAGmodel
| tail | the nodeId (or the name) of the tail in tail->head |
| head | the nodeId (or the name) of the head in tail->head |
Definition at line 163 of file DAGmodel_inl.h.
References dag_, gum::DiGraph::descendants(), and gum::DiscreteGraphicalModel::idFromName().
| 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 116 of file IBayesNet_tpl.h.
References dim(), gum::DAGmodel::nodes(), gum::DAGmodel::parents(), and gum::DiscreteGraphicalModel::variable().
Referenced by cpt(), and dim().
|
virtualinherited |
Return true if this graphical model is empty.
Definition at line 114 of file graphicalModel_inl.h.
References size().
Referenced by gum::IBayesNet< GUM_SCALAR >::check(), gum::BayesNet< GUM_SCALAR >::clear(), and size().
| Tensor< GUM_SCALAR > gum::IBayesNet< GUM_SCALAR >::evEq | ( | std::string_view | name, |
| double | value ) const |
Definition at line 384 of file IBayesNet_tpl.h.
References gum::Tensor< GUM_SCALAR >::evEq(), and gum::DiscreteGraphicalModel::variableFromName().
Referenced by cpt().
| Tensor< GUM_SCALAR > gum::IBayesNet< GUM_SCALAR >::evGt | ( | std::string_view | name, |
| double | value ) const |
Definition at line 395 of file IBayesNet_tpl.h.
References gum::Tensor< GUM_SCALAR >::evGt(), and gum::DiscreteGraphicalModel::variableFromName().
Referenced by cpt().
| Tensor< GUM_SCALAR > gum::IBayesNet< GUM_SCALAR >::evIn | ( | std::string_view | name, |
| double | val1, | ||
| double | val2 ) const |
Definition at line 390 of file IBayesNet_tpl.h.
References gum::Tensor< GUM_SCALAR >::evIn(), and gum::DiscreteGraphicalModel::variableFromName().
Referenced by cpt().
| Tensor< GUM_SCALAR > gum::IBayesNet< GUM_SCALAR >::evLt | ( | std::string_view | name, |
| double | value ) const |
Definition at line 400 of file IBayesNet_tpl.h.
References gum::Tensor< GUM_SCALAR >::evLt(), and gum::DiscreteGraphicalModel::variableFromName().
Referenced by cpt().
Return true if this node exists in this graphical model.
Implements gum::GraphicalModel.
Definition at line 141 of file DAGmodel_inl.h.
References dag_, and gum::NodeGraphPart::exists().
Referenced by gum::build_node(), gum::build_node_for_ID(), hasSameStructure(), gum::MarkovBlanket::hasSameStructure(), gum::IBayesNet< GUM_SCALAR >::operator==(), and gum::InfluenceDiagram< GUM_SCALAR >::operator==().
|
finalvirtualinherited |
Returns a named copy of the internal DAG: each node id is assigned the name of the corresponding variable.
O(n) — allocates a new DAG. For a stable reference (listeners, long-lived pointers), use internalDag().
Implements gum::GraphicalModel.
Definition at line 143 of file DAGmodel_inl.h.
References gum::VariableNodeMap::exists(), and gum::DiscreteGraphicalModel::variableNodeMap().
return true if the arc tail->head exists in the DAGmodel
| tail | the nodeId (or the name) of the tail in tail->head |
| head | the nodeId (or the name) of the head in tail->head |
Definition at line 75 of file DAGmodel_inl.h.
References dag_, and gum::ArcGraphPart::existsArc().
Referenced by existsArc(), gum::BayesNet< GUM_SCALAR >::reverseArc(), gum::BayesNetFragment< GUM_SCALAR >::toDot(), and gum::BayesNetFragment< GUM_SCALAR >::whenArcDeleted().
|
inherited |
return true if the arc tail->head exists in the DAGmodel
| tail | the nodeId (or the name) of the tail in tail->head |
| head | the nodeId (or the name) of the head in tail->head |
Definition at line 79 of file DAGmodel_inl.h.
References existsArc(), and gum::DiscreteGraphicalModel::idFromName().
|
inherited |
check wether a property exists in this GraphicalModel
Definition at line 170 of file graphicalModel_inl.h.
References _propertiesMap_, and gum::HashTable< Key, Val >::exists().
returns the parents of a node and the node
| id | the node which is the head of an arc with the returned nodes |
| name | the name of the node the node which is the head of an arc with the returned nodes |
| NotFound | if the node does not exist in the model |
Implements gum::GraphicalModel.
Definition at line 100 of file DAGmodel_inl.h.
References _checkNodeExists_(), dag_, and gum::DiGraph::family().
|
finalvirtualinherited |
return true if the arc tail->head exists in the DAGmodel
| tail | the nodeId (or the name) of the tail in tail->head |
| head | the nodeId (or the name) of the head in tail->head |
Implements gum::GraphicalModel.
Definition at line 105 of file DAGmodel_inl.h.
References dag_, gum::DiGraph::family(), and gum::DiscreteGraphicalModel::idFromName().
Definition at line 87 of file DAGmodel.cpp.
References DAGmodel(), arcs(), exists(), gum::Set< Key >::exists(), gum::DiscreteGraphicalModel::idFromName(), gum::Variable::name(), nodes(), size(), sizeArcs(), and gum::DiscreteGraphicalModel::variable().
|
overridevirtualinherited |
Returns the NodeId of a variable given its name.
| NotFound | if no such name exists in the model. |
Implements gum::GraphicalModel.
Reimplemented in gum::InfluenceDiagram< GUM_SCALAR >, and gum::prm::InstanceBayesNet< GUM_SCALAR >.
Definition at line 61 of file discreteGraphicalModel_inl.h.
References gum::VariableNodeMap::idFromName(), and varMap_.
Referenced by gum::ASTposteriorProba< GUM_SCALAR >::_compute_knw_from_bn(), gum::DAGmodel::ancestors(), gum::InfluenceDiagram< GUM_SCALAR >::clear(), gum::DAGmodel::descendants(), gum::ASTjointProba< GUM_SCALAR >::eval(), gum::ASTposteriorProba< GUM_SCALAR >::eval(), gum::ASTsum< GUM_SCALAR >::eval(), gum::UGmodel::exists(), gum::DAGmodel::existsArc(), gum::UGmodel::existsEdge(), gum::DAGmodel::family(), gum::UGmodel::family(), gum::DAGmodel::hasSameStructure(), gum::MarkovBlanket::hasSameStructure(), gum::UGmodel::hasSameStructure(), gum::EssentialGraph::idFromName(), gum::UGmodel::isIndependent(), gum::UGmodel::neighbours(), gum::IBayesNet< GUM_SCALAR >::operator==(), gum::IMarkovRandomField< GUM_SCALAR >::operator==(), gum::DAGmodel::parents(), and gum::IMarkovRandomField< GUM_SCALAR >::smallestFactorFromNode().
|
inherited |
transform a vector of names into a vector of nodeId
Definition at line 139 of file graphicalModel_inl.h.
References names(), and variableNodeMap().
Referenced by gum::DAGmodel::children(), exists(), names(), names(), and gum::DAGmodel::parents().
|
inherited |
Returns a const reference to the internal (unnamed) DAG. O(1), no copy. Use for stable references or pointers (e.g. graph listeners). For named node access, use dag() instead.
Definition at line 58 of file DAGmodel_inl.h.
References dag_.
Referenced by gum::BayesNetFragment< GUM_SCALAR >::BayesNetFragment(), gum::MarkovBlanket::MarkovBlanket(), gum::BayesNetFragment< GUM_SCALAR >::installCPT(), gum::BayesNetFragment< GUM_SCALAR >::isInstalledNode(), gum::BayesBall::relevantTensors(), gum::dSeparationAlgorithm::relevantTensors(), gum::BayesNetFragment< GUM_SCALAR >::toBN(), gum::BayesNetFragment< GUM_SCALAR >::toDot(), and gum::BayesNetFragment< GUM_SCALAR >::whenArcDeleted().
|
finalvirtualinherited |
check if nodes X and nodes Y are independent given nodes Z
Implements gum::GraphicalModel.
Definition at line 192 of file DAGmodel_inl.h.
|
inherited |
build a UndiGraph by moralizing the Ancestral Graph of a set of Nodes
| nodes | the set of nodeId |
| nodenames | the vector of names of nodes |
Definition at line 220 of file DAGmodel_inl.h.
References isIndependent(), and gum::GraphicalModel::nodeset().
|
finalvirtualinherited |
check if node X and node Y are independent given nodes Z
Implements gum::GraphicalModel.
Definition at line 188 of file DAGmodel_inl.h.
References dag_, and gum::DAG::dSeparation().
Referenced by isIndependent().
|
inherited |
build a UndiGraph by moralizing the Ancestral Graph of a set of Nodes
| nodes | the set of nodeId |
| nodenames | the vector of names of nodes |
Definition at line 214 of file DAGmodel_inl.h.
| 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).
Definition at line 236 of file IBayesNet_tpl.h.
Referenced by cpt().
|
inherited |
Definition at line 93 of file graphicalModel_inl.h.
References nodes().
Referenced by gum::IMarkovRandomField< GUM_SCALAR >::toString(), gum::InfluenceDiagram< GUM_SCALAR >::toString(), and variableFromName().
| 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).
Definition at line 254 of file IBayesNet_tpl.h.
Referenced by cpt().
| GUM_SCALAR gum::IBayesNet< GUM_SCALAR >::maxNonOneParam | ( | ) | const |
Definition at line 172 of file IBayesNet_tpl.h.
References cpt(), and gum::DAGmodel::nodes().
Referenced by cpt().
| GUM_SCALAR gum::IBayesNet< GUM_SCALAR >::maxParam | ( | ) | const |
Definition at line 152 of file IBayesNet_tpl.h.
References cpt(), and gum::DAGmodel::nodes().
Referenced by cpt().
| Size gum::IBayesNet< GUM_SCALAR >::maxVarDomainSize | ( | ) | const |
Definition at line 132 of file IBayesNet_tpl.h.
References gum::DAGmodel::nodes(), and gum::DiscreteGraphicalModel::variable().
Referenced by cpt(), and gum::ImportanceSampling< GUM_SCALAR >::onContextualize_().
| Size gum::IBayesNet< GUM_SCALAR >::memoryFootprint | ( | ) | const |
compute the (approximated) footprint in memory of the model (the footprints of CPTs)
Definition at line 182 of file IBayesNet_tpl.h.
References cpt(), and gum::DAGmodel::nodes().
Referenced by cpt().
|
inherited |
Definition at line 200 of file DAGmodel_inl.h.
References dag_, and gum::DAG::minimalCondSet().
|
inherited |
Definition at line 209 of file DAGmodel_inl.h.
|
inherited |
Definition at line 196 of file DAGmodel_inl.h.
References dag_, and gum::DAG::minimalCondSet().
Referenced by gum::ASTposteriorProba< GUM_SCALAR >::_compute_knw_from_bn().
|
inherited |
Definition at line 204 of file DAGmodel_inl.h.
| GUM_SCALAR gum::IBayesNet< GUM_SCALAR >::minNonZeroParam | ( | ) | const |
Definition at line 162 of file IBayesNet_tpl.h.
Referenced by cpt(), and gum::ImportanceSampling< GUM_SCALAR >::onContextualize_().
| GUM_SCALAR gum::IBayesNet< GUM_SCALAR >::minParam | ( | ) | const |
Definition at line 142 of file IBayesNet_tpl.h.
References cpt(), and gum::DAGmodel::nodes().
Referenced by cpt().
|
inherited |
The node's id are coherent with the variables and nodes of the topology.
Definition at line 81 of file DAGmodel.cpp.
References gum::GraphicalModel::_nameNodes_(), dag_, and gum::DAG::moralGraph().
Referenced by gum::prm::SVE< GUM_SCALAR >::_eliminateNodes_(), gum::prm::SVED< GUM_SCALAR >::_eliminateNodes_(), gum::prm::SVE< GUM_SCALAR >::_eliminateNodesWithEvidence_(), gum::prm::SVED< GUM_SCALAR >::_eliminateNodesWithEvidence_(), gum::prm::SVE< GUM_SCALAR >::_initLiftedNodes_(), and gum::prm::SVED< GUM_SCALAR >::_initLiftedNodes_().
build a UndiGraph by moralizing the Ancestral Graph of a set of Nodes
| nodes | the set of nodeId |
| nodenames | the vector of names of nodes |
Definition at line 182 of file DAGmodel_inl.h.
Referenced by moralizedAncestralGraph().
|
inherited |
build a UndiGraph by moralizing the Ancestral Graph of a set of Nodes
| nodes | the set of nodeId |
| nodenames | the vector of names of nodes |
Definition at line 178 of file DAGmodel_inl.h.
References moralizedAncestralGraph(), and gum::GraphicalModel::nodeset().
|
inherited |
transform a NodeSet in a vector of names
Definition at line 129 of file graphicalModel_inl.h.
References ids(), gum::VariableNodeMap::name(), and variableNodeMap().
|
inherited |
transform a vector of NodeId in a vector of names
Definition at line 117 of file graphicalModel_inl.h.
References ids().
Referenced by gum::DAGmodel::children(), exists(), ids(), nodeset(), and gum::DAGmodel::parents().
|
overridevirtualinherited |
Returns the NodeId of a variable.
| NotFound | if no variable matches var. |
Implements gum::GraphicalModel.
Reimplemented in gum::InfluenceDiagram< GUM_SCALAR >, and gum::prm::InstanceBayesNet< GUM_SCALAR >.
Definition at line 56 of file discreteGraphicalModel_inl.h.
References gum::VariableNodeMap::get(), and varMap_.
Referenced by gum::InfluenceDiagram< GUM_SCALAR >::clear(), gum::BayesBall::relevantTensors(), and gum::dSeparationAlgorithm::relevantTensors().
|
finalvirtualinherited |
Returns a named copy of the internal DAG: each node id is assigned the name of the corresponding variable.
O(n) — allocates a new DAG. For a stable reference (listeners, long-lived pointers), use internalDag().
Implements gum::GraphicalModel.
Definition at line 147 of file DAGmodel_inl.h.
References dag_.
Referenced by gum::BayesNetFragment< GUM_SCALAR >::BayesNetFragment(), gum::Estimator< GUM_SCALAR >::Estimator(), gum::BayesNetFragment< GUM_SCALAR >::~BayesNetFragment(), gum::EssentialGraph::_buildEssentialGraph_(), gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::_verticesSampling_(), gum::BayesNet< GUM_SCALAR >::beginTopologyTransformation(), gum::InfluenceDiagram< GUM_SCALAR >::beginTopologyTransformation(), gum::IBayesNet< GUM_SCALAR >::check(), gum::BayesNetFragment< GUM_SCALAR >::checkConsistency(), gum::BayesNet< GUM_SCALAR >::clear(), gum::InfluenceDiagram< GUM_SCALAR >::copyStructureAndTables_(), gum::IBayesNet< GUM_SCALAR >::dim(), gum::BayesNet< GUM_SCALAR >::endTopologyTransformation(), gum::InfluenceDiagram< GUM_SCALAR >::endTopologyTransformation(), gum::InfluenceDiagram< GUM_SCALAR >::fastPrototype(), gum::BayesNet< GUM_SCALAR >::generateCPTs(), gum::getMaxModality(), hasSameStructure(), gum::IBayesNet< GUM_SCALAR >::maxNonOneParam(), gum::IBayesNet< GUM_SCALAR >::maxParam(), gum::IBayesNet< GUM_SCALAR >::maxVarDomainSize(), gum::IBayesNet< GUM_SCALAR >::memoryFootprint(), gum::IBayesNet< GUM_SCALAR >::minParam(), gum::prm::ClassBayesNet< GUM_SCALAR >::modalities(), gum::prm::InstanceBayesNet< GUM_SCALAR >::modalities(), gum::IBayesNet< GUM_SCALAR >::operator==(), gum::InfluenceDiagram< GUM_SCALAR >::operator==(), gum::Estimator< GUM_SCALAR >::setFromBN(), gum::BayesNetFragment< GUM_SCALAR >::toBN(), gum::prm::ClassBayesNet< GUM_SCALAR >::toDot(), gum::prm::InstanceBayesNet< GUM_SCALAR >::toDot(), and gum::ImportanceSampling< GUM_SCALAR >::unsharpenBN_().
|
inherited |
transform a vector of names into a NodeSet
Definition at line 102 of file graphicalModel.cpp.
References idFromName(), gum::Set< Key >::insert(), and names().
Referenced by gum::DAGmodel::children(), exists(), gum::DAGmodel::isIndependent(), gum::UGmodel::isIndependent(), gum::UGmodel::isIndependent(), gum::DAGmodel::moralizedAncestralGraph(), and gum::DAGmodel::parents().
| IBayesNet< GUM_SCALAR > & gum::IBayesNet< GUM_SCALAR >::operator= | ( | const IBayesNet< GUM_SCALAR > & | source | ) |
Copy operator.
Definition at line 92 of file IBayesNet_tpl.h.
References IBayesNet(), and gum::DAGmodel::operator=().
Referenced by gum::BayesNet< GUM_SCALAR >::operator=(), gum::BayesNet< GUM_SCALAR >::operator=(), gum::prm::ClassBayesNet< GUM_SCALAR >::operator=(), and gum::prm::InstanceBayesNet< GUM_SCALAR >::operator=().
| IBayesNet< GUM_SCALAR > & gum::IBayesNet< GUM_SCALAR >::operator= | ( | IBayesNet< GUM_SCALAR > && | source | ) |
Move operator.
Definition at line 102 of file IBayesNet_tpl.h.
References IBayesNet(), and gum::DAGmodel::operator=().
| bool gum::IBayesNet< GUM_SCALAR >::operator== | ( | const IBayesNet< GUM_SCALAR > & | from | ) | const |
This operator compares 2 BNs !
Definition at line 271 of file IBayesNet_tpl.h.
References IBayesNet(), gum::Instantiation::chgVal(), cpt(), gum::Instantiation::end(), gum::DAGmodel::exists(), gum::DiscreteGraphicalModel::idFromName(), gum::Instantiation::inc(), gum::Variable::name(), gum::Instantiation::nbrDim(), gum::DAGmodel::nodes(), gum::Instantiation::pos(), gum::Instantiation::setFirst(), gum::DAGmodel::size(), gum::DAGmodel::sizeArcs(), gum::Instantiation::val(), gum::DiscreteGraphicalModel::variable(), gum::Instantiation::variable(), and gum::DiscreteGraphicalModel::variableFromName().
Referenced by cpt().
returns the set of nodes with arc ingoing to a given node
Note that the set of nodes returned may be empty if no arc within the ArcGraphPart is ingoing into the given node.
| id | the node which is the head of an arc with the returned nodes |
| name | the name of the node the node which is the head of an arc with the returned nodes |
| NotFound | if the node does not exist in the model |
Definition at line 89 of file DAGmodel_inl.h.
References _checkNodeExists_(), dag_, gum::Set< Key >::empty(), and gum::ArcGraphPart::parents().
Referenced by gum::IBayesNet< GUM_SCALAR >::check(), gum::BayesNetFragment< GUM_SCALAR >::checkConsistency(), gum::InfluenceDiagram< GUM_SCALAR >::copyStructureAndTables_(), gum::IBayesNet< GUM_SCALAR >::dim(), gum::ASTposteriorProba< GUM_SCALAR >::eval(), gum::BayesNetFragment< GUM_SCALAR >::installCPT(), gum::BayesNetFragment< GUM_SCALAR >::installCPT_(), gum::prm::ClassBayesNet< GUM_SCALAR >::toDot(), and gum::prm::InstanceBayesNet< GUM_SCALAR >::toDot().
returns the parents of a set of nodes
| NotFound | if one of the nodes does not exist in the model |
Definition at line 130 of file DAGmodel_inl.h.
References gum::GraphicalModel::ids().
|
inherited |
return true if the arc tail->head exists in the DAGmodel
| tail | the nodeId (or the name) of the tail in tail->head |
| head | the nodeId (or the name) of the head in tail->head |
Definition at line 137 of file DAGmodel_inl.h.
References dag_, gum::GraphicalModel::names(), gum::GraphicalModel::nodeset(), and gum::ArcGraphPart::parents().
|
inherited |
return true if the arc tail->head exists in the DAGmodel
| tail | the nodeId (or the name) of the tail in tail->head |
| head | the nodeId (or the name) of the head in tail->head |
Definition at line 96 of file DAGmodel_inl.h.
References dag_, gum::DiscreteGraphicalModel::idFromName(), and gum::ArcGraphPart::parents().
|
inherited |
List of all the names of property in the Graphical model.
Definition at line 79 of file graphicalModel_inl.h.
References _propertiesMap_.
|
inherited |
Return the value of the property name of this GraphicalModel.
| NotFound | Raised if no name property is found. |
Definition at line 60 of file graphicalModel_inl.h.
References _properties_(), GUM_ERROR, and gum::HashTable< Key, Val >::tryGet().
|
inherited |
Return the value of the property name of this GraphicalModel.
return byDefault if the property name is not found
Definition at line 72 of file graphicalModel_inl.h.
References _propertiesMap_, and gum::HashTable< Key, Val >::tryGet().
Referenced by gum::IMarkovRandomField< GUM_SCALAR >::toDot(), gum::InfluenceDiagram< GUM_SCALAR >::toDot(), and gum::IMarkovRandomField< GUM_SCALAR >::toDotAsFactorGraph().
|
inherited |
Add or change a property of this GraphicalModel.
Definition at line 87 of file graphicalModel_inl.h.
References _propertiesMap_, gum::HashTable< Key, Val >::insert(), and gum::HashTable< Key, Val >::tryGet().
Referenced by gum::IBayesNet< GUM_SCALAR >::IBayesNet(), gum::IMarkovRandomField< GUM_SCALAR >::IMarkovRandomField(), gum::BayesNet< GUM_SCALAR >::fastPrototype(), and gum::InfluenceDiagram< GUM_SCALAR >::fastPrototype().
|
finalvirtualinherited |
Returns the number of variables in this Directed Graphical Model.
Implements gum::GraphicalModel.
Definition at line 68 of file DAGmodel_inl.h.
References dag_, and gum::NodeGraphPart::size().
Referenced by gum::InfluenceDiagram< GUM_SCALAR >::copyStructureAndTables_(), gum::InfluenceDiagram< GUM_SCALAR >::decisionNodeSize(), hasSameStructure(), gum::MarkovBlanket::hasSameStructure(), gum::IBayesNet< GUM_SCALAR >::operator==(), gum::InfluenceDiagram< GUM_SCALAR >::operator==(), gum::prm::ClassBayesNet< GUM_SCALAR >::toDot(), and gum::prm::InstanceBayesNet< GUM_SCALAR >::toDot().
|
inherited |
Returns the number of arcs in this Directed Graphical Model.
Definition at line 71 of file DAGmodel_inl.h.
References dag_, and gum::ArcGraphPart::sizeArcs().
Referenced by hasSameStructure(), gum::MarkovBlanket::hasSameStructure(), gum::IBayesNet< GUM_SCALAR >::operator==(), gum::InfluenceDiagram< GUM_SCALAR >::operator==(), and gum::InfluenceDiagram< GUM_SCALAR >::toString().
|
staticinherited |
send to the stream the space complexity with 3 parametrs
| s | the stream |
| dSize | the log10domainSize |
| dim | the dimension |
| usedMem | the memory needed for the params |
Definition at line 110 of file graphicalModel.cpp.
Referenced by isIndependent().
|
virtual |
Reimplemented in gum::prm::ClassBayesNet< GUM_SCALAR >, and gum::prm::InstanceBayesNet< GUM_SCALAR >.
Definition at line 200 of file IBayesNet_tpl.h.
References toDot().
Referenced by cpt(), and toDot().
|
virtual |
A dot representation of this IBayesNet, with the options given by the caller.
The nodes are named after the variables, with the tooltip "(id) name"; the options are indexed by the identifiers of the nodes.
Reimplemented in gum::BayesNetFragment< GUM_SCALAR >.
Definition at line 205 of file IBayesNet_tpl.h.
The topological order stays the same as long as no variable or arcs are added or erased src the topology.
| clear | If false returns the previously created topology. |
Definition at line 151 of file DAGmodel_inl.h.
References dag_, and gum::DiGraph::topologicalOrder().
Referenced by gum::EssentialGraph::_buildEssentialGraph_(), gum::InfluenceDiagramGenerator< GUM_SCALAR >::_checkTemporalOrder_(), gum::InfluenceDiagram< GUM_SCALAR >::decisionOrder(), and gum::InfluenceDiagram< GUM_SCALAR >::decisionOrderExists().
| std::string gum::IBayesNet< GUM_SCALAR >::toString | ( | ) | const |
Definition at line 191 of file IBayesNet_tpl.h.
Referenced by cpt(), and gum::operator<<().
|
inherited |
update the meta data of this Graphical Model (version, creation date, last modification date) This method is called by the writers ONLY before writing the model to a file.
Definition at line 81 of file graphicalModel.cpp.
References _propertiesMap_, gum::HashTable< Key, Val >::insert(), and gum::HashTable< Key, Val >::tryGet().
|
overridevirtualinherited |
Returns a constant reference over a variable given its node id.
| NotFound | if no variable's id matches id. |
Implements gum::GraphicalModel.
Reimplemented in gum::InfluenceDiagram< GUM_SCALAR >, and gum::prm::InstanceBayesNet< GUM_SCALAR >.
Definition at line 51 of file discreteGraphicalModel_inl.h.
References gum::VariableNodeMap::get(), and varMap_.
Referenced by gum::Estimator< GUM_SCALAR >::Estimator(), gum::EssentialGraph::_buildEssentialGraph_(), gum::ASTposteriorProba< GUM_SCALAR >::_compute_knw_from_bn(), gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::_insertEvidence_(), gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::_verticesSampling_(), gum::IBayesNet< GUM_SCALAR >::check(), gum::InfluenceDiagram< GUM_SCALAR >::clear(), gum::IBayesNet< GUM_SCALAR >::dim(), gum::ASTsum< GUM_SCALAR >::eval(), gum::DAGmodel::hasSameStructure(), gum::MarkovBlanket::hasSameStructure(), gum::UGmodel::hasSameStructure(), gum::IBayesNet< GUM_SCALAR >::maxVarDomainSize(), gum::IMarkovRandomField< GUM_SCALAR >::maxVarDomainSize(), gum::EssentialGraph::nameFromId(), gum::IBayesNet< GUM_SCALAR >::operator==(), gum::IMarkovRandomField< GUM_SCALAR >::operator==(), gum::Estimator< GUM_SCALAR >::setFromBN(), gum::EssentialGraph::skeleton(), gum::EssentialGraph::toDot(), gum::IMarkovRandomField< GUM_SCALAR >::toDot(), gum::MarkovBlanket::toDot(), and gum::IMarkovRandomField< GUM_SCALAR >::toDotAsFactorGraph().
|
overridevirtualinherited |
Returns a constant reference over a variable given its name.
| NotFound | if no such name exists in the model. |
Implements gum::GraphicalModel.
Reimplemented in gum::InfluenceDiagram< GUM_SCALAR >, and gum::prm::InstanceBayesNet< GUM_SCALAR >.
Definition at line 66 of file discreteGraphicalModel_inl.h.
References gum::VariableNodeMap::variableFromName(), and varMap_.
Referenced by gum::InfluenceDiagram< GUM_SCALAR >::clear(), gum::IBayesNet< GUM_SCALAR >::evEq(), gum::IBayesNet< GUM_SCALAR >::evGt(), gum::IBayesNet< GUM_SCALAR >::evIn(), gum::IBayesNet< GUM_SCALAR >::evLt(), gum::IBayesNet< GUM_SCALAR >::operator==(), and gum::IMarkovRandomField< GUM_SCALAR >::operator==().
|
overridevirtualinherited |
Returns a constant reference to the VariableNodeMap of this model.
Implements gum::GraphicalModel.
Reimplemented in gum::InfluenceDiagram< GUM_SCALAR >, and gum::prm::InstanceBayesNet< GUM_SCALAR >.
Definition at line 48 of file discreteGraphicalModel_inl.h.
References varMap_.
Referenced by gum::InfluenceDiagram< GUM_SCALAR >::clear(), and gum::DAGmodel::exists().
|
inherited |
transform a vector of NodeId into a VariableeSet
Definition at line 160 of file graphicalModel_inl.h.
|
inherited |
transform a vector of names into a VariableeSet
Definition at line 150 of file graphicalModel_inl.h.
References gum::Set< Key >::insert(), gum::VariableNodeMap::variableFromName(), and variableNodeMap().
Referenced by exists().
|
privateinherited |
The properties of this Directed Graphical Model.
Definition at line 262 of file graphicalModel.h.
Referenced by GraphicalModel(), GraphicalModel(), _properties_(), existsProperty(), operator=(), operator=(), properties(), propertyWithDefault(), setProperty(), and updateMetaData().
|
protectedinherited |
The DAG of this Directed Graphical Model.
Definition at line 291 of file DAGmodel.h.
Referenced by DAGmodel(), DAGmodel(), _checkNodeExists_(), gum::prm::ClassBayesNet< GUM_SCALAR >::_get_(), gum::prm::ClassBayesNet< GUM_SCALAR >::_init_(), gum::prm::InstanceBayesNet< GUM_SCALAR >::_init_(), gum::BayesNet< GUM_SCALAR >::add(), gum::BayesNet< GUM_SCALAR >::addArc(), gum::InfluenceDiagram< GUM_SCALAR >::addArc(), gum::InfluenceDiagram< GUM_SCALAR >::addNode_(), ancestors(), ancestors(), arcs(), children(), connectedComponents(), dag(), descendants(), descendants(), gum::BayesNet< GUM_SCALAR >::erase(), gum::InfluenceDiagram< GUM_SCALAR >::erase(), gum::BayesNet< GUM_SCALAR >::eraseArc(), gum::InfluenceDiagram< GUM_SCALAR >::eraseArc(), exists(), existsArc(), gum::InfluenceDiagram< GUM_SCALAR >::existsPathBetween(), family(), family(), gum::InfluenceDiagram< GUM_SCALAR >::getChildrenDecision_(), gum::InfluenceDiagram< GUM_SCALAR >::getDecisionGraph(), gum::InfluenceDiagram< GUM_SCALAR >::getPartialTemporalOrder(), gum::BayesNetFragment< GUM_SCALAR >::installArc_(), gum::BayesNetFragment< GUM_SCALAR >::installNode(), internalDag(), isIndependent(), minimalCondSet(), minimalCondSet(), moralGraph(), gum::InfluenceDiagram< GUM_SCALAR >::moralGraph_(), nodes(), operator=(), operator=(), parents(), parents(), parents(), size(), sizeArcs(), gum::InfluenceDiagram< GUM_SCALAR >::toDot(), topologicalOrder(), gum::BayesNetFragment< GUM_SCALAR >::uninstallArc_(), and gum::BayesNetFragment< GUM_SCALAR >::uninstallNode().
|
protectedinherited |
Mapping between NodeIds and discrete variables.
Definition at line 119 of file discreteGraphicalModel.h.
Referenced by DiscreteGraphicalModel(), DiscreteGraphicalModel(), gum::BayesNet< GUM_SCALAR >::add(), gum::InfluenceDiagram< GUM_SCALAR >::addNode_(), gum::InfluenceDiagram< GUM_SCALAR >::changeVariableName(), gum::BayesNet< GUM_SCALAR >::erase(), gum::BayesNet< GUM_SCALAR >::erase(), gum::InfluenceDiagram< GUM_SCALAR >::erase(), gum::InfluenceDiagram< GUM_SCALAR >::erase(), gum::BayesNet< GUM_SCALAR >::eraseArc(), idFromName(), nodeId(), operator=(), operator=(), gum::BayesNet< GUM_SCALAR >::reverseArc(), variable(), variableFromName(), and variableNodeMap().