51#ifndef GUM_CONTINGENCY_TABLE_H
52#define GUM_CONTINGENCY_TABLE_H
70 template <
typename GUM_ELEMENT_A,
typename GUM_ELEMENT_B >
91 void*
operator new(
size_t s);
93 void operator delete(
void* p);
105 void add(GUM_ELEMENT_A valueA, GUM_ELEMENT_B valueB);
109 Idx joint(GUM_ELEMENT_A valueA, GUM_ELEMENT_B valueB)
const;
HashTable< GUM_ELEMENT_B, Idx > _attrBMarginalTable_
HashTableConstIteratorSafe< GUM_ELEMENT_B, Idx > attrBEndSafe() const
Increments the number of sample for case( iattr, ivalue ).
void add(GUM_ELEMENT_A valueA, GUM_ELEMENT_B valueB)
Increments the number of sample for case( iattr, ivalue ).
std::string toString() const
HashTable< GUM_ELEMENT_A, Idx > _attrAMarginalTable_
~ContingencyTable()
Default destructor.
ContingencyTable()
Default constructor.
Idx attrBMarginal(GUM_ELEMENT_B valueB) const
Returns the number of samples for case (iattr, ivalue).
HashTableConstIteratorSafe< GUM_ELEMENT_B, Idx > attrBBeginSafe() const
Returns the number of samples for column ivalue.
Idx attrAMarginal(GUM_ELEMENT_A valueA) const
Returns the number of samples for case (iattr, ivalue).
HashTableConstIteratorSafe< GUM_ELEMENT_A, Idx > attrAEndSafe() const
Increments the number of sample for case( iattr, ivalue ).
Idx attrASize() const
Returns the number of samples for line iattr.
HashTable< std::pair< GUM_ELEMENT_A, GUM_ELEMENT_B >, Idx > _jointTable_
The contingency table used to compute the GStat Left Idx is for the attribute Right Idx for the value...
Idx attrBSize() const
Returns the number of samples for column ivalue.
HashTableConstIteratorSafe< GUM_ELEMENT_A, Idx > attrABeginSafe() const
Returns the number of samples for line iattr.
Idx joint(GUM_ELEMENT_A valueA, GUM_ELEMENT_B valueB) const
Returns the number of samples for case (iattr, ivalue).
ContingencyTable< GUM_ELEMENT_A, GUM_ELEMENT_B > & operator+=(const ContingencyTable< GUM_ELEMENT_A, GUM_ELEMENT_B > &src)
The class for generic Hash Tables.
Template implementations for the ContingencyTable class.
Size Idx
Type for indexes.
gum is the global namespace for all aGrUM entities
Headers of the Observation class.