![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
#include <BNdistance.h>
Public Member Functions | |
| BNdistance (const IBayesNet< GUM_SCALAR > &P, const IBayesNet< GUM_SCALAR > &Q) | |
| constructor must give 2 BNs | |
| BNdistance (const BNdistance< GUM_SCALAR > &kl) | |
| copy constructor | |
| virtual | ~BNdistance () |
| destructor | |
| Complexity | difficulty () const |
| return KL::Complexity::Heavy,KL::Complexity::Difficult,KL::Complexity::Correct depending on the BNs p and q | |
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 Member Functions | |
| virtual void | computeKL_ () |
| void | process_ () |
Protected Attributes | |
| const IBayesNet< GUM_SCALAR > & | p_ |
| const IBayesNet< GUM_SCALAR > & | q_ |
| GUM_SCALAR | klPQ_ |
| GUM_SCALAR | klQP_ |
| Size | errorPQ_ |
| Size | errorQP_ |
| GUM_SCALAR | hellinger_ |
| GUM_SCALAR | bhattacharya_ |
| GUM_SCALAR | jsd_ |
Private Member Functions | |
| bool | _checkCompatibility_ () const |
Private Attributes | |
| Complexity | _difficulty_ |
| bool | _done_ |
Definition at line 86 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 59 of file BNdistance_tpl.h.
References BNdistance(), _checkCompatibility_(), _difficulty_, _done_, gum::Correct, gum::Difficult, errorPQ_, errorQP_, GAP_COMPLEXITY_KL_DIFFICULT_CORRECT, GAP_COMPLEXITY_KL_HEAVY_DIFFICULT, gum::Heavy, klPQ_, klQP_, p_, and q_.
Referenced by BNdistance(), BNdistance(), gum::ExactBNdistance< GUM_SCALAR >::ExactBNdistance(), gum::ExactBNdistance< GUM_SCALAR >::ExactBNdistance(), gum::GibbsBNdistance< GUM_SCALAR >::GibbsBNdistance(), gum::GibbsBNdistance< GUM_SCALAR >::GibbsBNdistance(), and ~BNdistance().
| gum::BNdistance< GUM_SCALAR >::BNdistance | ( | const BNdistance< GUM_SCALAR > & | kl | ) |
copy constructor
Definition at line 74 of file BNdistance_tpl.h.
References BNdistance(), _difficulty_, _done_, errorPQ_, errorQP_, klPQ_, klQP_, p_, and q_.
|
virtual |
destructor
Definition at line 81 of file BNdistance_tpl.h.
References BNdistance().
|
private |
Definition at line 144 of file BNdistance_tpl.h.
References GUM_ERROR, gum::Variable::name(), p_, q_, and gum::DiscreteVariable::toString().
Referenced by BNdistance().
| INLINE double gum::BNdistance< GUM_SCALAR >::bhattacharya | ( | ) |
Definition at line 109 of file BNdistance_tpl.h.
References bhattacharya_, and process_().
|
protectedvirtual |
Reimplemented in gum::ExactBNdistance< GUM_SCALAR >, and gum::GibbsBNdistance< GUM_SCALAR >.
Definition at line 186 of file BNdistance_tpl.h.
References GUM_ERROR.
Referenced by 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 86 of file BNdistance_tpl.h.
References _difficulty_.
| INLINE Size gum::BNdistance< GUM_SCALAR >::errorPQ | ( | ) |
Definition at line 121 of file BNdistance_tpl.h.
References errorPQ_, and process_().
| INLINE Size gum::BNdistance< GUM_SCALAR >::errorQP | ( | ) |
Definition at line 127 of file BNdistance_tpl.h.
References errorQP_, and process_().
| INLINE double gum::BNdistance< GUM_SCALAR >::hellinger | ( | ) |
Definition at line 103 of file BNdistance_tpl.h.
References hellinger_, and process_().
| INLINE double gum::BNdistance< GUM_SCALAR >::jsd | ( | ) |
Definition at line 115 of file BNdistance_tpl.h.
References jsd_, and process_().
| INLINE double gum::BNdistance< GUM_SCALAR >::klPQ | ( | ) |
Definition at line 91 of file BNdistance_tpl.h.
References klPQ_, and process_().
| INLINE double gum::BNdistance< GUM_SCALAR >::klQP | ( | ) |
Definition at line 97 of file BNdistance_tpl.h.
References klQP_, and process_().
| INLINE const IBayesNet< GUM_SCALAR > & gum::BNdistance< GUM_SCALAR >::p | ( | ) | const |
Definition at line 133 of file BNdistance_tpl.h.
References p_.
Referenced by gum::GibbsBNdistance< GUM_SCALAR >::GibbsBNdistance().
|
protected |
Definition at line 177 of file BNdistance_tpl.h.
References _done_, and computeKL_().
Referenced by bhattacharya(), errorPQ(), errorQP(), hellinger(), jsd(), klPQ(), and klQP().
| INLINE const IBayesNet< GUM_SCALAR > & gum::BNdistance< GUM_SCALAR >::q | ( | ) | const |
|
private |
Definition at line 171 of file BNdistance.h.
Referenced by BNdistance(), BNdistance(), and difficulty().
|
private |
Definition at line 172 of file BNdistance.h.
Referenced by BNdistance(), BNdistance(), and process_().
|
protected |
Definition at line 166 of file BNdistance.h.
Referenced by bhattacharya(), gum::ExactBNdistance< GUM_SCALAR >::computeKL_(), and gum::GibbsBNdistance< GUM_SCALAR >::computeKL_().
|
protected |
Definition at line 162 of file BNdistance.h.
Referenced by BNdistance(), BNdistance(), gum::ExactBNdistance< GUM_SCALAR >::computeKL_(), gum::GibbsBNdistance< GUM_SCALAR >::computeKL_(), and errorPQ().
|
protected |
Definition at line 163 of file BNdistance.h.
Referenced by BNdistance(), BNdistance(), gum::ExactBNdistance< GUM_SCALAR >::computeKL_(), gum::GibbsBNdistance< GUM_SCALAR >::computeKL_(), and errorQP().
|
protected |
Definition at line 165 of file BNdistance.h.
Referenced by gum::ExactBNdistance< GUM_SCALAR >::computeKL_(), gum::GibbsBNdistance< GUM_SCALAR >::computeKL_(), and hellinger().
|
protected |
Definition at line 167 of file BNdistance.h.
Referenced by gum::ExactBNdistance< GUM_SCALAR >::computeKL_(), gum::GibbsBNdistance< GUM_SCALAR >::computeKL_(), and jsd().
|
protected |
Definition at line 159 of file BNdistance.h.
Referenced by BNdistance(), BNdistance(), gum::ExactBNdistance< GUM_SCALAR >::computeKL_(), gum::GibbsBNdistance< GUM_SCALAR >::computeKL_(), and klPQ().
|
protected |
Definition at line 160 of file BNdistance.h.
Referenced by BNdistance(), BNdistance(), gum::ExactBNdistance< GUM_SCALAR >::computeKL_(), gum::GibbsBNdistance< GUM_SCALAR >::computeKL_(), and klQP().
|
protected |
Definition at line 156 of file BNdistance.h.
Referenced by BNdistance(), BNdistance(), _checkCompatibility_(), gum::ExactBNdistance< GUM_SCALAR >::computeKL_(), gum::GibbsBNdistance< GUM_SCALAR >::computeKL_(), and p().
|
protected |
Definition at line 157 of file BNdistance.h.
Referenced by BNdistance(), BNdistance(), _checkCompatibility_(), gum::ExactBNdistance< GUM_SCALAR >::computeKL_(), gum::GibbsBNdistance< GUM_SCALAR >::computeKL_(), and q().