49#ifndef GUM_GRAPHICALMODEL_H
50#define GUM_GRAPHICALMODEL_H
93 const std::string&
property(
const std::string& name)
const;
100 const std::string& byDefault)
const;
105 void setProperty(
const std::string& name,
const std::string& value);
110 std::vector< std::string >
properties()
const;
129 virtual bool empty()
const;
135 virtual bool exists(
const std::string& name)
const = 0;
141 std::vector< std::string >
names(
const std::vector< NodeId >&
ids)
const;
153 std::vector< NodeId >
ids(
const std::vector< std::string >&
names)
const;
Base classes for directed acyclic graphs.
Base class for discrete random variable.
const HashTable< std::string, std::string > & _properties_() const
Return the properties of this Directed Graphical Model.
virtual ~GraphicalModel()
Destructor.
virtual const DiscreteVariable & variable(NodeId id) const =0
Returns a constant reference over a variable given it's node id.
static void spaceCplxToStream(std::stringstream &s, double dSize, int dim, Size usedMem)
send to the stream the space complexity with 3 parametrs
void setProperty(const std::string &name, const std::string &value)
Add or change a property of this GraphicalModel.
GraphicalModel & operator=(const GraphicalModel &source)
Private copy operator.
virtual const VariableNodeMap & variableNodeMap() const =0
Returns a constant reference to the VariableNodeMap of this Graphical Model.
virtual bool exists(const std::string &name) const =0
Returns a constant reference to the VariableNodeMap of this Graphical Model.
virtual NodeSet family(const NodeId id) const =0
returns the family of a noe (parents or neighbours) of a node and the node
HashTable< std::string, std::string > _propertiesMap_
The properties of this Directed Graphical Model.
const std::string & property(const std::string &name) const
Return the value of the property name of this GraphicalModel.
const std::string & propertyWithDefault(const std::string &name, const std::string &byDefault) const
Return the value of the property name of this GraphicalModel.
std::vector< NodeId > ids(const std::vector< std::string > &names) const
transform a vector of names into a vector of nodeId
virtual const NodeGraphPart & nodes() const =0
Returns a constant reference to the VariableNodeMap of this Graphical Model.
std::vector< std::string > names(const std::vector< NodeId > &ids) const
transform a vector of NodeId in a vector of names
GraphicalModel()
Default constructor.
virtual bool exists(NodeId node) const =0
Return true if this node exists in this graphical model.
gum::VariableSet variables(const std::vector< std::string > &l) const
transform a vector of names into a VariableeSet
virtual bool isIndependent(const NodeSet &X, const NodeSet &Y, const NodeSet &Z) const =0
check if nodes X and nodes Y are independent given nodes Z
virtual bool isIndependent(NodeId X, NodeId Y, const NodeSet &Z) const =0
check if node X and node Y are independent given nodes Z
virtual NodeId idFromName(const std::string &name) const =0
Getter by name.
virtual const DiscreteVariable & variableFromName(const std::string &name) const =0
Getter by name.
double log10DomainSize() const
std::vector< std::string > properties() const
List of all the properties.
NodeSet nodeset(const std::vector< std::string > &names) const
transform a vector of names into a NodeSet
virtual NodeSet family(const std::string &name) const =0
virtual NodeId nodeId(const DiscreteVariable &var) const =0
Return id node src discrete var pointer.
Instantiation completeInstantiation() const
Get an instantiation over all the variables of the model.
virtual bool empty() const
Return true if this graphical model is empty.
virtual Size size() const =0
Returns the number of variables in this Directed Graphical Model.
Class for assigning/browsing values to tuples of discrete variables.
Class for node sets in graph.
Container used to map discrete variables with nodes.
Interface-like class encapsulating basic functionalities for both a IBayesNet and IMarkovRandomField.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Size NodeId
Type for node ids.
Set< NodeId > NodeSet
Some typdefs and define for shortcuts ...
Header files of gum::Instantiation.
gum is the global namespace for all aGrUM entities
Set< const DiscreteVariable * > VariableSet
Header of class VariableNodeMap.