aGrUM  0.16.0
essentialGraph.h
Go to the documentation of this file.
1 
30 #ifndef GUM_ESSENTIALGRAPH_H
31 #define GUM_ESSENTIALGRAPH_H
32 
36 #include <agrum/graphs/undiGraph.h>
37 
38 namespace gum {
39 
58  public:
59  EssentialGraph() = default;
60  // this constructor will build the essential graph
61  explicit EssentialGraph(const DAGmodel& m);
62  // this constructor will use mh as essential graph for m
63  EssentialGraph(const DAGmodel& m, const MixedGraph& mg);
66 
68 
71 
73  std::string toDot() const;
74 
76  const NodeSet& parents(const NodeId id) const;
77 
79  const NodeSet& children(const NodeId id) const;
80 
82  const NodeSet& neighbours(const NodeId id) const;
83 
85  Size sizeArcs() const;
86 
88  const ArcSet& arcs() const;
90  Size sizeEdges() const;
91 
93  const EdgeSet& edges() const;
94 
96  Size sizeNodes() const;
98  Size size() const;
99 
100  UndiGraph skeleton() const;
101 
103  const NodeGraphPart& nodes() const;
104 
105  private:
106  void __buildEssentialGraph();
108 
111  };
112 } // namespace gum
113 
114 #ifndef GUM_NO_INLINE
116 #endif // GUM_NOINLINE
117 
118 #endif // GUM_ESSENTIALGRAPH_H
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Virtual base class for PGMs using a DAG.
Definition: DAGmodel.h:48
const NodeGraphPart & nodes() const
wrapping MixedGraph::nodes()
const NodeSet & parents(const NodeId id) const
wrapping MixedGraph::parents(id)
EssentialGraph & operator=(const EssentialGraph &g)
const NodeSet & neighbours(const NodeId id) const
wrapping MixedGraph::parents(id)
std::string toDot() 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.
Definition: agrum.h:25
bool __strongly_protected(NodeId a, NodeId b)
Size size() const
wrapping MixedGraph::size()
const DAGmodel * __dagmodel
UndiGraph skeleton() const
Size sizeEdges() const
wrapping MixedGraph::sizeEdges()
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Size sizeArcs() const
wrapping MixedGraph::sizeArcs()
Size sizeNodes() const
wrapping MixedGraph::sizeNodes()
const EdgeSet & edges() const
wrapping MixedGraph::edges()
Class for node sets in graph.
Class building the essential graph from a BN.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Base class for undirected graphs.
Definition: undiGraph.h:109
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Definition: types.h:48
const NodeSet & children(const NodeId id) const
wrapping MixedGraph::parents(id)
EssentialGraph()=default
const ArcSet & arcs() const
wrapping MixedGraph::arcs()
Size NodeId
Type for node ids.
Definition: graphElements.h:98
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Base class for mixed graphs.
Definition: mixedGraph.h:127