![]() |
aGrUM
0.16.0
|
#include <BNdistance.h>
Public Member Functions | |
BNdistance (const IBayesNet< GUM_SCALAR > &P, const IBayesNet< GUM_SCALAR > &Q) | |
constructor must give 2 BNs More... | |
BNdistance (const BNdistance< GUM_SCALAR > &kl) | |
copy constructor More... | |
virtual | ~BNdistance () |
destructor More... | |
Complexity | difficulty () const |
return KL::Complexity::Heavy,KL::Complexity::Difficult,KL::Complexity::Correct depending on the BNs __p and __q More... | |
Accessors to results. The first call do the computations. The | |
others do not. | |
double | klPQ () |
Size | errorPQ () |
double | klQP () |
Size | errorQP () |
double | hellinger () |
double | bhattacharya () |
double | jsd () |
const IBayesNet< GUM_SCALAR > & | p () const |
const IBayesNet< GUM_SCALAR > & | q () const |
Protected Attributes | |
const IBayesNet< GUM_SCALAR > & | _p |
const IBayesNet< GUM_SCALAR > & | _q |
GUM_SCALAR | _klPQ |
GUM_SCALAR | _klQP |
GUM_SCALAR | _hellinger |
GUM_SCALAR | _bhattacharya |
GUM_SCALAR | _jsd |
Size | _errorPQ |
Size | _errorQP |
Protected Member Functions | |
virtual void | _computeKL () |
void | _process () |
Definition at line 68 of file BNdistance.h.
gum::BNdistance< GUM_SCALAR >::BNdistance | ( | const IBayesNet< GUM_SCALAR > & | P, |
const IBayesNet< GUM_SCALAR > & | Q | ||
) |
constructor must give 2 BNs
gum::OperationNotAllowed | if the 2 BNs have not the same domainSize or compatible node sets. |
Definition at line 38 of file BNdistance_tpl.h.
References gum::BNdistance< GUM_SCALAR >::__checkCompatibility(), gum::BNdistance< GUM_SCALAR >::__difficulty, gum::BNdistance< GUM_SCALAR >::_p, gum::Correct, gum::Difficult, GAP_COMPLEXITY_KL_DIFFICULT_CORRECT, GAP_COMPLEXITY_KL_HEAVY_DIFFICULT, and gum::Heavy.
gum::BNdistance< GUM_SCALAR >::BNdistance | ( | const BNdistance< GUM_SCALAR > & | kl | ) |
copy constructor
Definition at line 57 of file BNdistance_tpl.h.
|
virtual |
destructor
Definition at line 65 of file BNdistance_tpl.h.
|
private |
Definition at line 128 of file BNdistance_tpl.h.
References gum::BNdistance< GUM_SCALAR >::_p, gum::BNdistance< GUM_SCALAR >::_q, gum::DiscreteVariable::domainSize(), GUM_ERROR, gum::DiscreteVariable::label(), and gum::Variable::name().
Referenced by gum::BNdistance< GUM_SCALAR >::BNdistance().
|
protectedvirtual |
Reimplemented in gum::GibbsBNdistance< GUM_SCALAR >, and gum::ExactBNdistance< GUM_SCALAR >.
Definition at line 187 of file BNdistance_tpl.h.
References GUM_ERROR.
Referenced by gum::BNdistance< GUM_SCALAR >::_process().
|
protected |
Definition at line 178 of file BNdistance_tpl.h.
References gum::BNdistance< GUM_SCALAR >::__done, and gum::BNdistance< GUM_SCALAR >::_computeKL().
Referenced by gum::BNdistance< GUM_SCALAR >::bhattacharya(), gum::BNdistance< GUM_SCALAR >::errorPQ(), gum::BNdistance< GUM_SCALAR >::errorQP(), gum::BNdistance< GUM_SCALAR >::hellinger(), gum::BNdistance< GUM_SCALAR >::jsd(), gum::BNdistance< GUM_SCALAR >::klPQ(), and gum::BNdistance< GUM_SCALAR >::klQP().
INLINE double gum::BNdistance< GUM_SCALAR >::bhattacharya | ( | ) |
Definition at line 93 of file BNdistance_tpl.h.
References gum::BNdistance< GUM_SCALAR >::_bhattacharya, and gum::BNdistance< GUM_SCALAR >::_process().
Complexity gum::BNdistance< GUM_SCALAR >::difficulty | ( | ) | const |
return KL::Complexity::Heavy,KL::Complexity::Difficult,KL::Complexity::Correct depending on the BNs __p and __q
Definition at line 70 of file BNdistance_tpl.h.
References gum::BNdistance< GUM_SCALAR >::__difficulty.
INLINE Size gum::BNdistance< GUM_SCALAR >::errorPQ | ( | ) |
Definition at line 105 of file BNdistance_tpl.h.
References gum::BNdistance< GUM_SCALAR >::_errorPQ, and gum::BNdistance< GUM_SCALAR >::_process().
INLINE Size gum::BNdistance< GUM_SCALAR >::errorQP | ( | ) |
Definition at line 111 of file BNdistance_tpl.h.
References gum::BNdistance< GUM_SCALAR >::_errorQP, and gum::BNdistance< GUM_SCALAR >::_process().
INLINE double gum::BNdistance< GUM_SCALAR >::hellinger | ( | ) |
Definition at line 87 of file BNdistance_tpl.h.
References gum::BNdistance< GUM_SCALAR >::_hellinger, and gum::BNdistance< GUM_SCALAR >::_process().
INLINE double gum::BNdistance< GUM_SCALAR >::jsd | ( | ) |
Definition at line 99 of file BNdistance_tpl.h.
References gum::BNdistance< GUM_SCALAR >::_jsd, and gum::BNdistance< GUM_SCALAR >::_process().
INLINE double gum::BNdistance< GUM_SCALAR >::klPQ | ( | ) |
Definition at line 75 of file BNdistance_tpl.h.
References gum::BNdistance< GUM_SCALAR >::_klPQ, and gum::BNdistance< GUM_SCALAR >::_process().
INLINE double gum::BNdistance< GUM_SCALAR >::klQP | ( | ) |
Definition at line 81 of file BNdistance_tpl.h.
References gum::BNdistance< GUM_SCALAR >::_klQP, and gum::BNdistance< GUM_SCALAR >::_process().
INLINE const IBayesNet< GUM_SCALAR > & gum::BNdistance< GUM_SCALAR >::p | ( | ) | const |
Definition at line 117 of file BNdistance_tpl.h.
References gum::BNdistance< GUM_SCALAR >::_p.
INLINE const IBayesNet< GUM_SCALAR > & gum::BNdistance< GUM_SCALAR >::q | ( | ) | const |
Definition at line 122 of file BNdistance_tpl.h.
References gum::BNdistance< GUM_SCALAR >::_q.
|
private |
Definition at line 150 of file BNdistance.h.
Referenced by gum::BNdistance< GUM_SCALAR >::BNdistance(), and gum::BNdistance< GUM_SCALAR >::difficulty().
|
private |
Definition at line 151 of file BNdistance.h.
Referenced by gum::BNdistance< GUM_SCALAR >::_process().
|
protected |
Definition at line 142 of file BNdistance.h.
Referenced by gum::ExactBNdistance< GUM_SCALAR >::_computeKL(), gum::GibbsBNdistance< GUM_SCALAR >::_computeKL(), and gum::BNdistance< GUM_SCALAR >::bhattacharya().
|
protected |
Definition at line 145 of file BNdistance.h.
Referenced by gum::ExactBNdistance< GUM_SCALAR >::_computeKL(), gum::GibbsBNdistance< GUM_SCALAR >::_computeKL(), and gum::BNdistance< GUM_SCALAR >::errorPQ().
|
protected |
Definition at line 146 of file BNdistance.h.
Referenced by gum::ExactBNdistance< GUM_SCALAR >::_computeKL(), gum::GibbsBNdistance< GUM_SCALAR >::_computeKL(), and gum::BNdistance< GUM_SCALAR >::errorQP().
|
protected |
Definition at line 141 of file BNdistance.h.
Referenced by gum::ExactBNdistance< GUM_SCALAR >::_computeKL(), gum::GibbsBNdistance< GUM_SCALAR >::_computeKL(), and gum::BNdistance< GUM_SCALAR >::hellinger().
|
protected |
Definition at line 143 of file BNdistance.h.
Referenced by gum::ExactBNdistance< GUM_SCALAR >::_computeKL(), gum::GibbsBNdistance< GUM_SCALAR >::_computeKL(), and gum::BNdistance< GUM_SCALAR >::jsd().
|
protected |
Definition at line 139 of file BNdistance.h.
Referenced by gum::ExactBNdistance< GUM_SCALAR >::_computeKL(), gum::GibbsBNdistance< GUM_SCALAR >::_computeKL(), and gum::BNdistance< GUM_SCALAR >::klPQ().
|
protected |
Definition at line 140 of file BNdistance.h.
Referenced by gum::ExactBNdistance< GUM_SCALAR >::_computeKL(), gum::GibbsBNdistance< GUM_SCALAR >::_computeKL(), and gum::BNdistance< GUM_SCALAR >::klQP().
|
protected |
|
protected |
Definition at line 137 of file BNdistance.h.
Referenced by gum::BNdistance< GUM_SCALAR >::__checkCompatibility(), gum::ExactBNdistance< GUM_SCALAR >::_computeKL(), gum::GibbsBNdistance< GUM_SCALAR >::_computeKL(), and gum::BNdistance< GUM_SCALAR >::q().