![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
Class building the essential graph from a BN. More...
#include <agrum/BN/algorithms/essentialGraph.h>
Public Member Functions | |
| EssentialGraph ()=default | |
| EssentialGraph (const DAGmodel &m) | |
| EssentialGraph (const DAGmodel &m, const PDAG &mg) | |
| EssentialGraph (const EssentialGraph &g) | |
| EssentialGraph & | operator= (const EssentialGraph &g) |
| ~EssentialGraph () | |
| PDAG | pdag () const |
| std::string | toDot () const |
| const NodeSet & | parents (NodeId id) const |
| wrapping MixedGraph::parents(id) | |
| const NodeSet & | children (NodeId id) const |
| wrapping MixedGraph::parents(id) | |
| NodeSet | parents (const NodeSet &ids) const |
| wrapping MixedGraph::parents(ids) | |
| NodeSet | children (const NodeSet &ids) const |
| wrapping MixedGraph::parents(ids) | |
| const NodeSet & | neighbours (NodeId id) const |
| wrapping MixedGraph::parents(id) | |
| Size | sizeArcs () const |
| wrapping MixedGraph::sizeArcs() | |
| const ArcSet & | arcs () const |
| wrapping MixedGraph::arcs() | |
| Size | sizeEdges () const |
| wrapping MixedGraph::sizeEdges() | |
| const EdgeSet & | edges () const |
| wrapping MixedGraph::edges() | |
| Size | sizeNodes () const |
| wrapping MixedGraph::sizeNodes() | |
| Size | size () const |
| wrapping MixedGraph::size() | |
| UndiGraph | skeleton () const |
| const NodeGraphPart & | nodes () const |
| wrapping MixedGraph::nodes() | |
| NodeId | idFromName (const std::string &name) const |
| wrappping DAGModel::idFromName() | |
| const std::string & | nameFromId (NodeId node) const |
| wrappping .name() | |
Private Member Functions | |
| void | _buildEssentialGraph_ () |
| bool | _strongly_protected_ (NodeId a, NodeId b) const |
Static Private Member Functions | |
| static bool | _strongly_protected_ (MixedGraph mg, NodeId a, NodeId b) |
Private Attributes | |
| const DAGmodel * | _dagmodel_ |
| PDAG | _pdag_ |
Class building the essential graph from a BN.
Essential graph is a mixed graph (Chain Graph) that represents the class of markov equivalent Bayesian networks (with the same independence model).
The main goal of this class is to nest the algorithm to build the essential graph from a BN and to encapsulate the representation (as a MixedGraph) of the essential graph.
gum::operator<<(std::ostream&, const BayesNet<GUM_SCALAR>&).
Definition at line 74 of file essentialGraph.h.
|
default |
References EssentialGraph().
Referenced by EssentialGraph(), EssentialGraph(), and operator=().
|
explicit |
Definition at line 56 of file essentialGraph.cpp.
References _buildEssentialGraph_(), and _dagmodel_.
| gum::EssentialGraph::EssentialGraph | ( | const EssentialGraph & | g | ) |
Definition at line 60 of file essentialGraph.cpp.
References EssentialGraph(), _buildEssentialGraph_(), and _dagmodel_.
|
default |
|
private |
Definition at line 75 of file essentialGraph.cpp.
References _dagmodel_, _pdag_, _strongly_protected_(), gum::DiGraph::addArc(), gum::UndiGraph::addEdge(), gum::NodeGraphPart::addNodeWithId(), gum::ArcGraphPart::arcs(), gum::ArcGraphPart::children(), gum::EdgeGraphPart::edges(), and gum::ArcGraphPart::eraseArc().
Referenced by EssentialGraph(), EssentialGraph(), and operator=().
|
staticprivate |
Definition at line 113 of file essentialGraph.cpp.
References gum::ArcGraphPart::existsArc(), gum::EdgeGraphPart::existsEdge(), and gum::ArcGraphPart::parents().
Definition at line 109 of file essentialGraph.cpp.
References _pdag_, and _strongly_protected_().
Referenced by _buildEssentialGraph_(), and _strongly_protected_().
| INLINE const ArcSet & gum::EssentialGraph::arcs | ( | ) | const |
wrapping MixedGraph::arcs()
Definition at line 71 of file essentialGraph_inl.h.
References _pdag_.
Referenced by skeleton().
wrapping MixedGraph::parents(ids)
Definition at line 63 of file essentialGraph_inl.h.
References _pdag_.
wrapping MixedGraph::parents(id)
Definition at line 59 of file essentialGraph_inl.h.
References _pdag_.
| INLINE const EdgeSet & gum::EssentialGraph::edges | ( | ) | const |
wrapping MixedGraph::edges()
Definition at line 75 of file essentialGraph_inl.h.
References _pdag_.
Referenced by skeleton().
| INLINE NodeId gum::EssentialGraph::idFromName | ( | const std::string & | name | ) | const |
wrappping DAGModel::idFromName()
Definition at line 83 of file essentialGraph_inl.h.
References _dagmodel_.
| INLINE const std::string & gum::EssentialGraph::nameFromId | ( | NodeId | node | ) | const |
wrapping MixedGraph::parents(id)
Definition at line 65 of file essentialGraph_inl.h.
References _pdag_.
| INLINE const NodeGraphPart & gum::EssentialGraph::nodes | ( | ) | const |
wrapping MixedGraph::nodes()
Definition at line 81 of file essentialGraph_inl.h.
References _pdag_.
Referenced by skeleton().
| EssentialGraph & gum::EssentialGraph::operator= | ( | const EssentialGraph & | g | ) |
Definition at line 65 of file essentialGraph.cpp.
References EssentialGraph(), _buildEssentialGraph_(), and _dagmodel_.
wrapping MixedGraph::parents(ids)
Definition at line 61 of file essentialGraph_inl.h.
References _pdag_.
wrapping MixedGraph::parents(id)
Definition at line 57 of file essentialGraph_inl.h.
References _pdag_.
| INLINE PDAG gum::EssentialGraph::pdag | ( | ) | const |
Definition at line 55 of file essentialGraph_inl.h.
References _pdag_.
| INLINE Size gum::EssentialGraph::size | ( | ) | const |
| INLINE Size gum::EssentialGraph::sizeArcs | ( | ) | const |
wrapping MixedGraph::sizeArcs()
Definition at line 69 of file essentialGraph_inl.h.
References _pdag_.
| INLINE Size gum::EssentialGraph::sizeEdges | ( | ) | const |
wrapping MixedGraph::sizeEdges()
Definition at line 73 of file essentialGraph_inl.h.
References _pdag_.
| INLINE Size gum::EssentialGraph::sizeNodes | ( | ) | const |
wrapping MixedGraph::sizeNodes()
Definition at line 77 of file essentialGraph_inl.h.
References _pdag_.
| UndiGraph gum::EssentialGraph::skeleton | ( | ) | const |
Definition at line 177 of file essentialGraph.cpp.
References gum::UndiGraph::addEdge(), gum::NodeGraphPart::addNodeWithId(), arcs(), edges(), and nodes().
| std::string gum::EssentialGraph::toDot | ( | ) | const |
Definition at line 149 of file essentialGraph.cpp.
References _dagmodel_, _pdag_, gum::List< Val >::exists(), and gum::List< Val >::insert().
|
private |
Definition at line 140 of file essentialGraph.h.
Referenced by EssentialGraph(), EssentialGraph(), EssentialGraph(), _buildEssentialGraph_(), idFromName(), nameFromId(), operator=(), and toDot().
|
private |
Definition at line 141 of file essentialGraph.h.
Referenced by EssentialGraph(), _buildEssentialGraph_(), _strongly_protected_(), arcs(), children(), children(), edges(), neighbours(), nodes(), parents(), parents(), pdag(), size(), sizeArcs(), sizeEdges(), sizeNodes(), and toDot().