Class barry::FreqTable¶
template <typename T>
Frequency table of vectors. More...
#include <barry.hpp>
Public Functions¶
| Type | Name |
|---|---|
| FreqTable () |
|
| size_t | add (const std::vector< T > & x, size_t * h_precomp) |
| Counts_type | as_vector () const |
| void | clear () |
| const std::vector< double > & | get_data () const |
| const std::unordered_map< size_t, size_t > & | get_index () const |
| size_t | make_hash (const std::vector< T > & x) const |
| void | print () const |
| void | reserve (size_t n, size_t k) |
| size_t | size () noexcept const Number of unique elements in the table. (. |
| ~FreqTable () |
Detailed Description¶
This is mostly used in Support. The main data is contained in the data double vector. The matrix is stored in a row-wise fashion, where the first element is the frequency with which the vector is observed.
For example, in a model with k terms the first k + 1 elements of data would be:
- weights
- term 1
- term 2
- ...
- term k
Public Functions Documentation¶
function FreqTable¶
function add¶
function as_vector¶
function clear¶
function get_data¶
function get_index¶
function make_hash¶
function print¶
function reserve¶
function size¶
Number of unique elements in the table. (.
Returns:
size_t
function ~FreqTable¶
The documentation for this class was generated from the following file include/barry/freqtable.hpp