![]() |
aGrUM
0.16.0
|
Detect barren nodes for inference in Bayesian networks. More...
#include <barrenNodesFinder.h>
Public Member Functions | |
Constructors / Destructors | |
BarrenNodesFinder (const DAG *dag) | |
default constructor More... | |
BarrenNodesFinder (const BarrenNodesFinder &from) | |
copy constructor More... | |
BarrenNodesFinder (BarrenNodesFinder &&from) noexcept | |
move constructor More... | |
~BarrenNodesFinder () | |
destructor More... | |
Operators | |
BarrenNodesFinder & | operator= (const BarrenNodesFinder &from) |
copy operator More... | |
BarrenNodesFinder & | operator= (BarrenNodesFinder &&from) |
move operator More... | |
Accessors / Modifiers | |
void | setDAG (const DAG *new_dag) |
sets a new DAG More... | |
void | setEvidence (const NodeSet *observed_nodes) |
sets the observed nodes in the DAG More... | |
void | setTargets (const NodeSet *target_nodes) |
sets the set of target nodes we are interested in More... | |
NodeSet | barrenNodes () |
returns the set of barren nodes More... | |
ArcProperty< NodeSet > | barrenNodes (const CliqueGraph &junction_tree) |
returns the set of barren nodes in the messages sent in a junction tree More... | |
template<typename GUM_SCALAR > | |
ArcProperty< Set< const Potential< GUM_SCALAR > *> > | barrenPotentials (const CliqueGraph &junction_tree, const IBayesNet< GUM_SCALAR > &bn) |
returns the set of barren potentials in messages sent in a junction tree More... | |
Detect barren nodes for inference in Bayesian networks.
Definition at line 47 of file barrenNodesFinder.h.
|
explicit |
default constructor
Definition at line 27 of file barrenNodesFinder_inl.h.
INLINE gum::BarrenNodesFinder::BarrenNodesFinder | ( | const BarrenNodesFinder & | from | ) |
copy constructor
Definition at line 34 of file barrenNodesFinder_inl.h.
|
noexcept |
move constructor
Definition at line 43 of file barrenNodesFinder_inl.h.
INLINE gum::BarrenNodesFinder::~BarrenNodesFinder | ( | ) |
destructor
Definition at line 52 of file barrenNodesFinder_inl.h.
References operator=().
NodeSet gum::BarrenNodesFinder::barrenNodes | ( | ) |
returns the set of barren nodes
Definition at line 298 of file barrenNodesFinder.cpp.
References __dag, __observed_nodes, __target_nodes, gum::List< Val, Alloc >::empty(), gum::List< Val, Alloc >::front(), gum::Set< Key, Alloc >::insert(), gum::List< Val, Alloc >::insert(), gum::NodeGraphPart::nodesProperty(), gum::ArcGraphPart::parents(), gum::List< Val, Alloc >::popFront(), and gum::NodeGraphPart::sizeNodes().
Referenced by barrenPotentials(), and gum::SamplingInference< GUM_SCALAR >::contextualize().
ArcProperty< NodeSet > gum::BarrenNodesFinder::barrenNodes | ( | const CliqueGraph & | junction_tree | ) |
returns the set of barren nodes in the messages sent in a junction tree
Definition at line 39 of file barrenNodesFinder.cpp.
References __dag, __observed_nodes, gum::Set< Key, Alloc >::begin(), gum::Set< Key, Alloc >::beginSafe(), gum::CliqueGraph::clique(), gum::EdgeGraphPart::edges(), gum::List< Val, Alloc >::empty(), gum::Set< Key, Alloc >::endSafe(), gum::Set< Key, Alloc >::erase(), gum::DiGraph::eraseNode(), gum::Set< Key, Alloc >::exists(), gum::Arc::first(), gum::List< Val, Alloc >::front(), gum::Arc::head(), gum::Set< Key, Alloc >::insert(), gum::SequenceImplementation< Key, Alloc, std::is_scalar< Key >::value >::insert(), gum::List< Val, Alloc >::insert(), gum::HashTable< Key, Val, Alloc >::insert(), gum::List< Val, Alloc >::popFront(), gum::CliqueGraph::separator(), gum::NodeGraphPart::size(), gum::Set< Key, Alloc >::size(), and gum::Arc::tail().
ArcProperty< Set< const Potential< GUM_SCALAR > *> > gum::BarrenNodesFinder::barrenPotentials | ( | const CliqueGraph & | junction_tree, |
const IBayesNet< GUM_SCALAR > & | bn | ||
) |
returns the set of barren potentials in messages sent in a junction tree
Definition at line 28 of file barrenNodesFinder_tpl.h.
References barrenNodes(), gum::IBayesNet< GUM_SCALAR >::cpt(), gum::Set< Key, Alloc >::insert(), and gum::HashTable< Key, Val, Alloc >::insert().
INLINE BarrenNodesFinder & gum::BarrenNodesFinder::operator= | ( | const BarrenNodesFinder & | from | ) |
copy operator
Definition at line 60 of file barrenNodesFinder_inl.h.
References __dag, __observed_nodes, and __target_nodes.
Referenced by ~BarrenNodesFinder().
INLINE BarrenNodesFinder & gum::BarrenNodesFinder::operator= | ( | BarrenNodesFinder && | from | ) |
move operator
Definition at line 72 of file barrenNodesFinder_inl.h.
References __dag, __observed_nodes, and __target_nodes.
INLINE void gum::BarrenNodesFinder::setDAG | ( | const DAG * | new_dag | ) |
sets a new DAG
Definition at line 83 of file barrenNodesFinder_inl.h.
References __dag.
INLINE void gum::BarrenNodesFinder::setEvidence | ( | const NodeSet * | observed_nodes | ) |
sets the observed nodes in the DAG
Definition at line 87 of file barrenNodesFinder_inl.h.
References __observed_nodes.
Referenced by gum::SamplingInference< GUM_SCALAR >::contextualize().
INLINE void gum::BarrenNodesFinder::setTargets | ( | const NodeSet * | target_nodes | ) |
sets the set of target nodes we are interested in
Definition at line 93 of file barrenNodesFinder_inl.h.
References __target_nodes.
Referenced by gum::SamplingInference< GUM_SCALAR >::contextualize().
|
private |
the DAG on which we compute the barren nodes
Definition at line 113 of file barrenNodesFinder.h.
Referenced by barrenNodes(), operator=(), and setDAG().
|
private |
the set of observed nodes
Definition at line 116 of file barrenNodesFinder.h.
Referenced by barrenNodes(), operator=(), and setEvidence().
|
private |
the set of targeted nodes
Definition at line 119 of file barrenNodesFinder.h.
Referenced by barrenNodes(), operator=(), and setTargets().