30 #ifndef GUM_DAGMODEL_H 31 #define GUM_DAGMODEL_H 76 const std::string&
property(
const std::string& name)
const;
83 const std::string& byDefault)
const;
88 void setProperty(
const std::string& name,
const std::string& value);
225 #ifndef GUM_NO_INLINE DAGmodel & operator=(const DAGmodel &source)
Private copy operator.
virtual const DiscreteVariable & variableFromName(const std::string &name) const =0
Getter by name.
const ArcSet & arcs() const
returns the set of nodes with arc ingoing to a given node
Virtual base class for PGMs using a DAG.
const NodeSet & children(const NodeId id) const
returns the set of nodes with arc outgoing from a given node
UndiGraph * __mutableMoralGraph
The moral graph of this Directed Graphical Model.
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.
const NodeSet & parents(const std::string &name) const
returns the set of nodes with arc ingoing to a given node
Container used to map discrete variables with nodes.
virtual ~DAGmodel()
Destructor.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Base class for discrete random variable.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
virtual const VariableNodeMap & variableNodeMap() const =0
Returns a constant reference to the VariableNodeMap of this Directed Graphical Model.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
virtual NodeId idFromName(const std::string &name) const =0
Getter by name.
HashTable< std::string, std::string > * __propertiesMap
The properties of this Directed Graphical Model. Initialized using a lazy instantiation.
bool hasSameStructure(const DAGmodel &other)
Size size() const
Returns the number of variables in this Directed Graphical Model.
DAG _dag
The DAG of this Directed Graphical Model.
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...
const std::string & property(const std::string &name) const
Return the value of the property name of this DAGModel.
void setProperty(const std::string &name, const std::string &value)
Add or change a property of this DAGModel.
void __moralGraph() const
Returns the moral graph of this DAGModel.
DAGmodel()
Default constructor.
const NodeGraphPart & nodes() const
Returns a constant reference to the dag of this Bayes Net.
virtual const DiscreteVariable & variable(NodeId id) const =0
Returns a constant reference over a variabe given it's node id.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
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 UndiGraph & moralGraph(bool clear=true) const
The node's id are coherent with the variables and nodes of the topology.
bool empty() const
Retursn true if this Directed Graphical Model is empty.
HashTable< std::string, std::string > & __properties() const
Return the properties of this Directed Graphical Model and initialize the hash table is necessary...
const NodeSet & children(const std::string &name) const
returns the set of nodes with arc ingoing to a given node
Base class for undirected graphs.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
double log10DomainSize() const
const DAG & dag() const
Returns a constant reference to the dag of this Bayes Net.
Size NodeId
Type for node ids.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
virtual NodeId nodeId(const DiscreteVariable &var) const =0
Return id node src discrete var pointer.