41 std::string msg =
"The following property does not exists: ";
49 const std::string& byDefault)
const {
52 }
catch (
NotFound&) {
return byDefault; }
78 for (
const auto node :
nodes()) {
79 dSize += std::log10(
variable(node).domainSize());
89 for (
const auto node :
dag())
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
const ArcSet & arcs() const
returns the set of nodes with arc ingoing to a given node
const NodeSet & children(const NodeId id) const
returns the set of nodes with arc outgoing from a given node
const NodeSet & parents(const NodeId id) const
returns the set of nodes with arc ingoing to a given node
Size sizeArcs() const
Returns the number of arcs in this Directed Graphical Model.
Size size() const
alias for sizeNodes
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
HashTable< std::string, std::string > * __propertiesMap
The properties of this Directed Graphical Model. Initialized using a lazy instantiation.
Size size() const
Returns the number of variables in this Directed Graphical Model.
DAG _dag
The DAG of this Directed Graphical Model.
const std::string & property(const std::string &name) const
Return the value of the property name of this DAGModel.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Size sizeArcs() const
indicates the number of arcs stored within the ArcGraphPart
void setProperty(const std::string &name, const std::string &value)
Add or change a property of this DAGModel.
const NodeGraphPart & nodes() const
Returns a constant reference to the dag of this Bayes Net.
const NodeSet & parents(const NodeId id) const
returns the set of nodes with arc ingoing to a given node
virtual const DiscreteVariable & variable(NodeId id) const =0
Returns a constant reference over a variabe given it's node id.
Class for node sets in graph.
const std::string & propertyWithDefault(const std::string &name, const std::string &byDefault) const
Return the value of the property name of this DAGModel.
virtual Instantiation completeInstantiation() const final
Get an instantiation over all the variables of the model.
Class for assigning/browsing values to tuples of discrete variables.
const NodeSet & children(const NodeId id) const
returns the set of nodes with arc outgoing from a given node
bool empty() const
Retursn true if this Directed Graphical Model is empty.
const ArcSet & arcs() const
returns the set of arcs stored within the ArcGraphPart
HashTable< std::string, std::string > & __properties() const
Return the properties of this Directed Graphical Model and initialize the hash table is necessary...
std::size_t Size
In aGrUM, hashed values are unsigned long int.
double log10DomainSize() const
value_type & insert(const Key &key, const Val &val)
Adds a new element (actually a copy of this element) into the hash table.
const DAG & dag() const
Returns a constant reference to the dag of this Bayes Net.
Size NodeId
Type for node ids.
#define GUM_ERROR(type, msg)