33 #endif // GUM_NOINLINE 39 bool nodes_resize_policy,
41 bool arcs_resize_policy) :
43 DiGraph(nodes_size, nodes_resize_policy, arcs_size, arcs_resize_policy) {
56 for (
const auto arc :
arcs())
57 moralgraph.
addEdge(arc.first(), arc.second());
60 for (
const auto node :
nodes()) {
61 const auto& par =
parents(node);
63 for (
auto it1 = par.begin(); it1 != par.end(); ++it1) {
66 for (++it2; it2 != par.end(); ++it2) {
virtual void addEdge(const NodeId first, const NodeId second)
insert a new edge into the undirected graph
UndiGraph moralGraph() const
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
DAG(Size nodes_size=HashTableConst::default_size, bool nodes_resize_policy=true, Size arcs_size=HashTableConst::default_size, bool arcs_resize_policy=true)
default constructor
const NodeSet & parents(const NodeId id) const
returns the set of nodes with arc ingoing to a given node
const NodeGraphPart & nodes() const
return *this as a NodeGraphPart
Base class for all oriented graphs.
Class for node sets in graph.
const ArcSet & arcs() const
returns the set of arcs stored within the ArcGraphPart
Base class for undirected graphs.
void populateNodes(const NodeGraphPart &s)
populateNodes clears *this and fills it with the same nodes as "s"
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.