![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
<agrum/FMDP/learning/core/contingencyTable.h> More...
#include <contingencyTable.h>
Public Member Functions | |
| ContingencyTable< GUM_SCALAR_A, GUM_SCALAR_B > & | operator+= (const ContingencyTable< GUM_SCALAR_A, GUM_SCALAR_B > &src) |
| std::string | toString () const |
Constructor & destructor. | |
| ContingencyTable () | |
| Default constructor. | |
| ~ContingencyTable () | |
| Default destructor. | |
| void * | operator new (size_t s) |
| Allocators and Deallocators redefinition. | |
| void | operator delete (void *p) |
| Default constructor. | |
| void | add (GUM_SCALAR_A valueA, GUM_SCALAR_B valueB) |
| Increments the number of sample for case( iattr, ivalue ). | |
| Idx | joint (GUM_SCALAR_A valueA, GUM_SCALAR_B valueB) const |
| Returns the number of samples for case (iattr, ivalue). | |
| Idx | attrAMarginal (GUM_SCALAR_A valueA) const |
| Returns the number of samples for case (iattr, ivalue). | |
| Idx | attrBMarginal (GUM_SCALAR_B valueB) const |
| Returns the number of samples for case (iattr, ivalue). | |
| HashTableConstIteratorSafe< GUM_SCALAR_A, Idx > | attrABeginSafe () const |
| Returns the number of samples for line iattr. | |
| HashTableConstIteratorSafe< GUM_SCALAR_A, Idx > | attrAEndSafe () const |
| Increments the number of sample for case( iattr, ivalue ). | |
| HashTableConstIteratorSafe< GUM_SCALAR_B, Idx > | attrBBeginSafe () const |
| Returns the number of samples for column ivalue. | |
| HashTableConstIteratorSafe< GUM_SCALAR_B, Idx > | attrBEndSafe () const |
| Increments the number of sample for case( iattr, ivalue ). | |
| Idx | attrASize () const |
| Returns the number of samples for line iattr. | |
| Idx | attrBSize () const |
| Returns the number of samples for column ivalue. | |
Private Attributes | |
| HashTable< std::pair< GUM_SCALAR_A, GUM_SCALAR_B >, Idx > | _jointTable_ |
| The contingency table used to compute the GStat Left Idx is for the attribute Right Idx for the value. | |
| HashTable< GUM_SCALAR_A, Idx > | _attrAMarginalTable_ |
| HashTable< GUM_SCALAR_B, Idx > | _attrBMarginalTable_ |
<agrum/FMDP/learning/core/contingencyTable.h>
Definition at line 71 of file contingencyTable.h.
| gum::ContingencyTable< GUM_SCALAR_A, GUM_SCALAR_B >::ContingencyTable | ( | ) |
Default constructor.
Definition at line 65 of file contingencyTable_tpl.h.
References ContingencyTable().
Referenced by ContingencyTable(), ~ContingencyTable(), operator delete(), and operator+=().
| gum::ContingencyTable< GUM_SCALAR_A, GUM_SCALAR_B >::~ContingencyTable | ( | ) |
Default destructor.
Definition at line 73 of file contingencyTable_tpl.h.
References ContingencyTable().
| void gum::ContingencyTable< GUM_SCALAR_A, GUM_SCALAR_B >::add | ( | GUM_SCALAR_A | valueA, |
| GUM_SCALAR_B | valueB ) |
Increments the number of sample for case( iattr, ivalue ).
Definition at line 85 of file contingencyTable_tpl.h.
|
inline |
Returns the number of samples for line iattr.
Definition at line 133 of file contingencyTable.h.
References _attrAMarginalTable_.
Referenced by operator+=().
|
inline |
Increments the number of sample for case( iattr, ivalue ).
Definition at line 137 of file contingencyTable.h.
References _attrAMarginalTable_.
Referenced by operator+=().
|
inline |
Returns the number of samples for case (iattr, ivalue).
Definition at line 119 of file contingencyTable.h.
References _attrAMarginalTable_.
|
inline |
Returns the number of samples for line iattr.
Definition at line 155 of file contingencyTable.h.
References _attrAMarginalTable_.
|
inline |
Returns the number of samples for column ivalue.
Definition at line 145 of file contingencyTable.h.
References _attrBMarginalTable_.
|
inline |
Increments the number of sample for case( iattr, ivalue ).
Definition at line 149 of file contingencyTable.h.
References _attrBMarginalTable_.
|
inline |
Returns the number of samples for case (iattr, ivalue).
Definition at line 125 of file contingencyTable.h.
References _attrAMarginalTable_.
|
inline |
Returns the number of samples for column ivalue.
Definition at line 159 of file contingencyTable.h.
References _attrBMarginalTable_.
|
inline |
Returns the number of samples for case (iattr, ivalue).
Definition at line 111 of file contingencyTable.h.
References _jointTable_.
Referenced by gum::ContingencyTable< Idx, GUM_SCALAR >::add().
|
inline |
Default constructor.
Definition at line 93 of file contingencyTable.h.
References ContingencyTable(), gum::SmallObjectAllocator::deallocate(), and gum::SmallObjectAllocator::instance().
|
inline |
Allocators and Deallocators redefinition.
Definition at line 91 of file contingencyTable.h.
References gum::SmallObjectAllocator::allocate(), and gum::SmallObjectAllocator::instance().
| ContingencyTable< GUM_SCALAR_A, GUM_SCALAR_B > & gum::ContingencyTable< GUM_SCALAR_A, GUM_SCALAR_B >::operator+= | ( | const ContingencyTable< GUM_SCALAR_A, GUM_SCALAR_B > & | src | ) |
Definition at line 101 of file contingencyTable_tpl.h.
References ContingencyTable(), _attrAMarginalTable_, attrABeginSafe(), and attrAEndSafe().
|
inline |
Definition at line 166 of file contingencyTable.h.
References _attrAMarginalTable_, _attrBMarginalTable_, and _jointTable_.
|
private |
Definition at line 185 of file contingencyTable.h.
Referenced by attrABeginSafe(), attrAEndSafe(), attrAMarginal(), attrASize(), attrBMarginal(), operator+=(), and toString().
|
private |
Definition at line 186 of file contingencyTable.h.
Referenced by attrBBeginSafe(), attrBEndSafe(), attrBSize(), and toString().
|
private |
The contingency table used to compute the GStat Left Idx is for the attribute Right Idx for the value.
NB: This is a silly and in a hurry implementation of contingency table If someone ever use this class and has time to correctly implements a efficient contingency table, you're welcome
Definition at line 184 of file contingencyTable.h.
Referenced by joint(), and toString().