39 if (
this != &source) {
48 if (
this == &other)
return true;
50 if (
size() != other.
size())
return false;
54 for (
const auto& nid:
nodes()) {
60 for (
const auto& edge:
edges()) {
UGmodel & operator=(const UGmodel &source)
Private copy operator.
UndiGraph _graph
The DAG of this Directed Graphical Model.
virtual NodeId idFromName(const std::string &name) const =0
Getter by name.
virtual const DiscreteVariable & variable(NodeId id) const =0
Returns a constant reference over a variable given it's node id.
const EdgeSet & edges() const
returns the neighbours of a node as set of nodes
virtual ~UGmodel()
Destructor.
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
UGmodel()
Default constructor.
Virtual base class for PGMs using a undirected graph.
bool exists(const Key &k) const
Indicates whether a given elements belong to the set.
GraphicalModel & operator=(const GraphicalModel &source)
Private copy operator.
const NodeGraphPart & nodes() const
Returns a constant reference to the dag of this Bayes Net.
Size sizeEdges() const
Returns the number of arcs in this Directed Graphical Model.
The base class for all undirected edges.
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
virtual Size size() const final
Returns the number of variables in this Directed Graphical Model.
bool hasSameStructure(const UGmodel &other)