![]() |
aGrUM 3.0.0
a C++ library for (probabilistic) graphical models
|
<agrum/base/multidim/core/testPolicies/ITestPolicy.h> More...
#include <ITestPolicy.h>
Public Member Functions | |
Constructor/Destructor | |
| ITestPolicy () | |
| Allocators and Deallocators redefinition. | |
| virtual | ~ITestPolicy () |
| Allocators and Deallocators redefinition. | |
| void * | operator new (size_t s) |
| Allocators and Deallocators redefinition. | |
| void | operator delete (void *p) |
| Allocators and Deallocators redefinition. | |
Observation methods | |
| virtual void | addObservation (Idx attr, GUM_ELEMENT value) |
| Comptabilizes the new observation. | |
| Idx | nbObservation () const |
| Comptabilizes the new observation. | |
Test methods | |
| virtual bool | isTestRelevant () const =0 |
| Returns true if enough observation were added so that the test can be relevant. | |
| virtual void | computeScore () const |
| Recomputes the statistic from the beginning. | |
| virtual double | score () const =0 |
| Returns the performance of current variable according to the test. | |
| virtual double | secondaryscore () const =0 |
| Returns a second criterion to severe ties. | |
Fusion Methods | |
| void | add (const ITestPolicy< GUM_ELEMENT > &src) |
Miscelleanous Methods | |
| std::string | toString () const |
Protected Member Functions | |
| bool | isModified_ () const |
Private Attributes | |
| bool | _isModified_ |
| Booleans indicating if we have to re eval test. | |
| Idx | _nbObs_ |
<agrum/base/multidim/core/testPolicies/ITestPolicy.h>
Interface specifying the methods to be implemented by any TestPolicy
Definition at line 71 of file ITestPolicy.h.
| gum::ITestPolicy< GUM_ELEMENT >::ITestPolicy | ( | ) |
Allocators and Deallocators redefinition.
Definition at line 49 of file ITestPolicy_tpl.h.
References ITestPolicy(), _isModified_, and _nbObs_.
Referenced by gum::Chi2TestPolicy< GUM_ELEMENT >::Chi2TestPolicy(), gum::GTestPolicy< GUM_ELEMENT >::GTestPolicy(), ITestPolicy(), gum::LeastSquareTestPolicy< GUM_ELEMENT >::LeastSquareTestPolicy(), ~ITestPolicy(), add(), operator delete(), operator new(), and secondaryscore().
|
virtual |
Allocators and Deallocators redefinition.
Definition at line 54 of file ITestPolicy_tpl.h.
References ITestPolicy().
| void gum::ITestPolicy< GUM_ELEMENT >::add | ( | const ITestPolicy< GUM_ELEMENT > & | src | ) |
Definition at line 86 of file ITestPolicy_tpl.h.
References ITestPolicy(), _isModified_, _nbObs_, and nbObservation().
Referenced by gum::Chi2TestPolicy< GUM_ELEMENT >::add(), gum::GTestPolicy< GUM_ELEMENT >::add(), and gum::LeastSquareTestPolicy< GUM_ELEMENT >::add().
|
virtual |
Comptabilizes the new observation.
Reimplemented in gum::Chi2TestPolicy< GUM_ELEMENT >, gum::GTestPolicy< GUM_ELEMENT >, and gum::LeastSquareTestPolicy< GUM_ELEMENT >.
Definition at line 70 of file ITestPolicy_tpl.h.
References _isModified_, and _nbObs_.
Referenced by gum::Chi2TestPolicy< GUM_ELEMENT >::addObservation(), gum::GTestPolicy< GUM_ELEMENT >::addObservation(), and gum::LeastSquareTestPolicy< GUM_ELEMENT >::addObservation().
|
virtual |
Recomputes the statistic from the beginning.
Reimplemented in gum::Chi2TestPolicy< GUM_ELEMENT >, and gum::GTestPolicy< GUM_ELEMENT >.
Definition at line 81 of file ITestPolicy_tpl.h.
References _isModified_.
Referenced by gum::Chi2TestPolicy< GUM_ELEMENT >::computeScore(), gum::GTestPolicy< GUM_ELEMENT >::computeScore(), and gum::LeastSquareTestPolicy< GUM_ELEMENT >::computeScore().
|
protected |
Definition at line 97 of file ITestPolicy_tpl.h.
References _isModified_.
Referenced by gum::Chi2TestPolicy< GUM_ELEMENT >::score(), gum::GTestPolicy< GUM_ELEMENT >::score(), gum::LeastSquareTestPolicy< GUM_ELEMENT >::score(), gum::Chi2TestPolicy< GUM_ELEMENT >::secondaryscore(), gum::GTestPolicy< GUM_ELEMENT >::secondaryscore(), and gum::LeastSquareTestPolicy< GUM_ELEMENT >::secondaryscore().
|
pure virtual |
Returns true if enough observation were added so that the test can be relevant.
Implemented in gum::Chi2TestPolicy< GUM_ELEMENT >, gum::GTestPolicy< GUM_ELEMENT >, and gum::LeastSquareTestPolicy< GUM_ELEMENT >.
| Idx gum::ITestPolicy< GUM_ELEMENT >::nbObservation | ( | ) | const |
Comptabilizes the new observation.
Definition at line 76 of file ITestPolicy_tpl.h.
References _nbObs_.
Referenced by add(), gum::Chi2TestPolicy< GUM_ELEMENT >::computeScore(), gum::GTestPolicy< GUM_ELEMENT >::computeScore(), gum::LeastSquareTestPolicy< GUM_ELEMENT >::computeScore(), gum::Chi2TestPolicy< GUM_ELEMENT >::isTestRelevant(), gum::GTestPolicy< GUM_ELEMENT >::isTestRelevant(), and gum::LeastSquareTestPolicy< GUM_ELEMENT >::isTestRelevant().
| void gum::ITestPolicy< GUM_ELEMENT >::operator delete | ( | void * | p | ) |
Allocators and Deallocators redefinition.
Definition at line 65 of file ITestPolicy_tpl.h.
References ITestPolicy(), gum::SmallObjectAllocator::deallocate(), and gum::SmallObjectAllocator::instance().
| void * gum::ITestPolicy< GUM_ELEMENT >::operator new | ( | size_t | s | ) |
Allocators and Deallocators redefinition.
Definition at line 60 of file ITestPolicy_tpl.h.
References ITestPolicy(), gum::SmallObjectAllocator::allocate(), and gum::SmallObjectAllocator::instance().
|
pure virtual |
Returns the performance of current variable according to the test.
Implemented in gum::Chi2TestPolicy< GUM_ELEMENT >, and gum::GTestPolicy< GUM_ELEMENT >.
|
pure virtual |
Returns a second criterion to severe ties.
Implemented in gum::Chi2TestPolicy< GUM_ELEMENT >, gum::GTestPolicy< GUM_ELEMENT >, and gum::LeastSquareTestPolicy< GUM_ELEMENT >.
References ITestPolicy().
| std::string gum::ITestPolicy< GUM_ELEMENT >::toString | ( | ) | const |
Definition at line 92 of file ITestPolicy_tpl.h.
References _nbObs_.
Referenced by gum::Chi2TestPolicy< GUM_ELEMENT >::toString(), and gum::GTestPolicy< GUM_ELEMENT >::toString().
|
mutableprivate |
Booleans indicating if we have to re eval test.
Definition at line 175 of file ITestPolicy.h.
Referenced by ITestPolicy(), add(), addObservation(), computeScore(), and isModified_().
|
private |
Definition at line 178 of file ITestPolicy.h.
Referenced by ITestPolicy(), add(), addObservation(), nbObservation(), and toString().