68 return graph_.existsEdge(node1, node2);
86 }
catch ([[maybe_unused]] gum::NotFound& e) {
return false; }
Class representing probabilistic undirected model.
bool hasUndirectedPath(NodeId n1, NodeId n2) const
return true if n1 and n2 are connected (by an undirected path) in the graph.
virtual NodeId idFromName(const std::string &name) const =0
Getter by name.
Class for node sets in graph.
Size size() const
alias for sizeNodes
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 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.
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
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.
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