56 if (
this != &source) {
67 if (
this == &other)
return true;
69 if (
size() != other.
size())
return false;
73 for (
const auto& nid:
nodes()) {
76 }
catch (
NotFound const&) {
return false; }
79 for (
const auto& arc:
arcs()) {
Class representing probabilistic DAG model.
Interface-like class encapsulating basic functionalities for a DAGModel.
The base class for all directed edges.
UndiGraph moralGraph() const
build a UndiGraph by moralizing the dag
const DAG & dag() const
Returns a constant reference to the dag of this Bayes Net.
DAG dag_
The DAG of this Directed Graphical Model.
DAGmodel()
Default constructor.
const ArcSet & arcs() const
return true if the arc tail->head exists in the DAGmodel
virtual Size size() const final
Returns the number of variables in this Directed Graphical Model.
Size sizeArcs() const
Returns the number of arcs in this Directed Graphical Model.
bool hasSameStructure(const DAGmodel &other)
DAGmodel & operator=(const DAGmodel &source)
Private copy operator.
UndiGraph moralGraph() const
The node's id are coherent with the variables and nodes of the topology.
virtual ~DAGmodel()
Destructor.
const NodeGraphPart & nodes() const final
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 variable given it's node id.
GraphicalModel & operator=(const GraphicalModel &source)
Private copy operator.
virtual NodeId idFromName(const std::string &name) const =0
Getter by name.
Exception : the element we looked for cannot be found.
bool exists(const Key &k) const
Indicates whether a given elements belong to the set.
Base class for undirected graphs.
gum is the global namespace for all aGrUM entities