112 bool exists(
const std::string& name)
const final;
128 bool existsEdge(
const std::string& name1,
const std::string& name2)
const;
145 const std::string& Yname,
146 const std::vector< std::string >& Znames)
const {
151 const std::vector< std::string >& Ynames,
152 const std::vector< std::string >& Znames)
const {
Interface-like class encapsulating basic functionalities for a IMarkovRandomFieldwork.
GraphicalModel()
Default constructor.
virtual NodeId idFromName(const std::string &name) const =0
Getter by name.
NodeSet nodeset(const std::vector< std::string > &names) const
transform a vector of names into a NodeSet
Class for node sets in graph.
Virtual base class for PGMs using a undirected graph.
virtual ~UGmodel()
Destructor.
UGmodel()
Default constructor.
NodeSet family(const NodeId id) const final
returns the the node as a NodeSet (in mixed graph : family is the node and its parents
const NodeGraphPart & nodes() const final
Returns a constant reference to the dag of this Bayes Net.
bool isIndependent(const std::vector< std::string > &Xnames, const std::vector< std::string > &Ynames, const std::vector< std::string > &Znames) const
return true if the edge node1-node2 exists in the UGModel
UGmodel & operator=(const UGmodel &source)
Private copy operator.
bool existsEdge(const NodeId node1, const NodeId node2) const
return true if the edge node1-node2 exists in the UGModel
bool exists(NodeId node) const final
Return true if this node exists in this graphical model.
UndiGraph graph_
The DAG of this Directed Graphical Model.
bool hasSameStructure(const UGmodel &other)
check if nodes X and nodes Y are independent given nodes Z
const EdgeSet & edges() const
return true if the edge node1-node2 exists in the UGModel
const UndiGraph & graph() const
Returns a constant reference to the dag of this Bayes Net.
bool isIndependent(NodeId X, NodeId Y, const NodeSet &Z) const final
check if X and Y are independent given Z
bool isIndependent(const std::string &Xname, const std::string &Yname, const std::vector< std::string > &Znames) const
return true if the edge node1-node2 exists in the UGModel
const NodeSet & neighbours(const NodeId id) const
returns the neighbours of a node as set of nodes
Size sizeEdges() const
Returns the number of arcs in this Directed Graphical Model.
virtual Size size() const final
Returns the number of variables in this Directed Graphical Model.
Base class for undirected graphs.
Class representing probabilistic DAG model.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Set< Edge > EdgeSet
Some typdefs and define for shortcuts ...
Size NodeId
Type for node ids.
Set< NodeId > NodeSet
Some typdefs and define for shortcuts ...
gum is the global namespace for all aGrUM entities