aGrUM 3.0.0
a C++ library for (probabilistic) graphical models
moralization.h File Reference

Moralization algorithms for aGrUM directed and mixed graphs. More...

Include dependency graph for moralization.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  gum
 gum is the global namespace for all aGrUM entities
namespace  gum::graph

Functions

template<GUM_DiGraphable G>
UndiGraph gum::graph::moralGraph (const G &g)
 Returns the moral graph of g.
template<GUM_DiGraphable G>
UndiGraph gum::graph::moralizedAncestralGraph (const G &g, const NodeSet &query)
 Returns the moralized ancestral graph of query in g.

Detailed Description

Moralization algorithms for aGrUM directed and mixed graphs.

Both functions are constrained by GUM_DiGraphable and adapt their behaviour at compile time via if constexpr (GUM_MixedGraphable<G>):

moralGraph

  • Pure directed graph (DAG): arcs → edges, then marry co-parents per node.
  • Mixed graph (PDAG / chain graph): arcs + edges → edges, then marry co-parents per chain component (nodes linked by undirected edges are treated as a single unit).

moralizedAncestralGraph

  • Pure directed graph: BFS backward via parents only.
  • Mixed graph: BFS backward via parents and bidirectionally via edges, then moralizes the collected subgraph with moralGraph.
Author
Pierre-Henri WUILLEMIN(_at_LIP6) and Christophe GONZALES(_at_AMU)

Definition in file moralization.h.