A counter function based on change statistics.
More...
#include <counters-bones.hpp>
|
| | ~Counter () |
| |
| double | count (Array_Type &Array, size_t i, size_t j) |
| |
| double | init (Array_Type &Array, size_t i, size_t j) |
| |
| std::string | get_name () const |
| |
| std::string | get_description () const |
| |
|
- Parameters
-
| count_fun_ | The main counter function. |
| init_fun_ | The initializer function can also be used to check if the BArray as the needed variables (see BArray::data). |
| data_ | Data to be used with the counter. |
| delete_data_ | When true, the destructor will delete the pointer in the main data. |
|
| | Counter () |
| |
| | Counter (Counter_fun_type< Array_Type, Data_Type > count_fun_, Counter_fun_type< Array_Type, Data_Type > init_fun_, Hasher_fun_type< Array_Type, Data_Type > hasher_fun_, Data_Type data_, std::string name_="", std::string desc_="") |
| |
| | Counter (const Counter< Array_Type, Data_Type > &counter_) |
| | Copy constructor. More...
|
| |
| | Counter (Counter< Array_Type, Data_Type > &&counter_) noexcept |
| | Move constructor. More...
|
| |
| Counter< Array_Type, Data_Type > | operator= (const Counter< Array_Type, Data_Type > &counter_) |
| | Copy assignment. More...
|
| |
| Counter< Array_Type, Data_Type > & | operator= (Counter< Array_Type, Data_Type > &&counter_) noexcept |
| | Move assignment. More...
|
| |
|
| void | set_hasher (Hasher_fun_type< Array_Type, Data_Type > fun) |
| | Get and set the hasher function. More...
|
| |
| Hasher_fun_type< Array_Type, Data_Type > | get_hasher () |
| |
template<typename Array_Type = BArray<>, typename Data_Type = bool>
class Counter< Array_Type, Data_Type >
A counter function based on change statistics.
This class is used by CountStats and StatsCounter as a way to count statistics using change statistics.
Definition at line 35 of file counters-bones.hpp.
◆ Counter() [1/4]
template<typename Array_Type = BArray<>, typename Data_Type = bool>
◆ Counter() [2/4]
template<typename Array_Type = BArray<>, typename Data_Type = bool>
◆ Counter() [3/4]
template<typename Array_Type = BArray<>, typename Data_Type = bool>
◆ Counter() [4/4]
template<typename Array_Type = BArray<>, typename Data_Type = bool>
◆ ~Counter()
template<typename Array_Type = BArray<>, typename Data_Type = bool>
◆ count()
template<typename Array_Type = BArray<>, typename Data_Type = bool>
| double Counter< Array_Type, Data_Type >::count |
( |
Array_Type & |
Array, |
|
|
size_t |
i, |
|
|
size_t |
j |
|
) |
| |
◆ get_description()
template<typename Array_Type = BArray<>, typename Data_Type = bool>
| std::string Counter< Array_Type, Data_Type >::get_description |
( |
| ) |
const |
◆ get_hasher()
template<typename Array_Type = BArray<>, typename Data_Type = bool>
◆ get_name()
template<typename Array_Type = BArray<>, typename Data_Type = bool>
| std::string Counter< Array_Type, Data_Type >::get_name |
( |
| ) |
const |
◆ init()
template<typename Array_Type = BArray<>, typename Data_Type = bool>
| double Counter< Array_Type, Data_Type >::init |
( |
Array_Type & |
Array, |
|
|
size_t |
i, |
|
|
size_t |
j |
|
) |
| |
◆ operator=() [1/2]
template<typename Array_Type = BArray<>, typename Data_Type = bool>
| Counter<Array_Type,Data_Type> Counter< Array_Type, Data_Type >::operator= |
( |
const Counter< Array_Type, Data_Type > & |
counter_ | ) |
|
◆ operator=() [2/2]
template<typename Array_Type = BArray<>, typename Data_Type = bool>
| Counter<Array_Type,Data_Type>& Counter< Array_Type, Data_Type >::operator= |
( |
Counter< Array_Type, Data_Type > && |
counter_ | ) |
|
|
noexcept |
◆ set_hasher()
template<typename Array_Type = BArray<>, typename Data_Type = bool>
Get and set the hasher function.
The hasher function is used to characterize the support of the array. This way, if possible, the support enumeration is recycled.
- Parameters
-
◆ count_fun
template<typename Array_Type = BArray<>, typename Data_Type = bool>
◆ data
template<typename Array_Type = BArray<>, typename Data_Type = bool>
| Data_Type Counter< Array_Type, Data_Type >::data |
◆ desc
template<typename Array_Type = BArray<>, typename Data_Type = bool>
| std::string Counter< Array_Type, Data_Type >::desc = "" |
◆ hasher_fun
template<typename Array_Type = BArray<>, typename Data_Type = bool>
◆ init_fun
template<typename Array_Type = BArray<>, typename Data_Type = bool>
◆ name
template<typename Array_Type = BArray<>, typename Data_Type = bool>
| std::string Counter< Array_Type, Data_Type >::name = "" |
The documentation for this class was generated from the following file: