1 #ifndef BARRY_COUNTERS_MEAT_HPP
2 #define BARRY_COUNTERS_MEAT_HPP 1
4 #define COUNTER_TYPE() Counter<Array_Type,Data_Type>
6 #define COUNTER_TEMPLATE_ARGS() <typename Array_Type, typename Data_Type>
8 #define COUNTER_TEMPLATE(a,b) \
9 template COUNTER_TEMPLATE_ARGS() inline a COUNTER_TYPE()::b
115 #define TMP_HASHER_CALL Hasher_fun_type<Array_Type,Data_Type>
119 #undef TMP_HASHER_CALL
125 #define COUNTERS_TYPE() Counters<Array_Type,Data_Type>
127 #define COUNTERS_TEMPLATE_ARGS() <typename Array_Type, typename Data_Type>
129 #define COUNTERS_TEMPLATE(a,b) \
130 template COUNTERS_TEMPLATE_ARGS() inline a COUNTERS_TYPE()::b
204 std::vector< std::string > out;
205 out.reserve(this->size());
206 for (
size_t i = 0u;
i < this->size(); ++
i)
207 out.push_back(
this->data.at(
i).get_name());
216 std::vector< std::string > out;
217 out.reserve(this->size());
218 for (
size_t i = 0u;
i < this->size(); ++
i)
219 out.push_back(
data.at(
i).get_description());
226 const Array_Type & array,
230 std::vector<double>
res;
240 for (
auto v: c.get_hasher()(array, &(c.data)))
250 res.push_back(array.nrow());
251 res.push_back(array.ncol());
257 for (
auto i:
hasher(array,
nullptr))
278 #undef COUNTER_TEMPLATE_ARGS
279 #undef COUNTER_TEMPLATE
281 #undef COUNTERS_TEMPLATE_ARGS
282 #undef COUNTERS_TEMPLATE
A counter function based on change statistics.
Data_Type &&counter_ desc(std::move(counter_.desc))
Move constructor.
Data_Type &&counter_ name(std::move(counter_.name))
Data_Type init_fun(counter_.init_fun)
Data_Type &&counter_ data(std::move(counter_.data))
Data_Type hasher_fun(counter_.hasher_fun)
Data_Type Counter_fun_type< Array_Type, Data_Type > init_fun_
Data_Type Counter_fun_type< Array_Type, Data_Type > Hasher_fun_type< Array_Type, Data_Type > hasher_fun_
Data_Type Counter_fun_type< Array_Type, Data_Type > Hasher_fun_type< Array_Type, Data_Type > Data_Type std::string std::string desc_
#define COUNTER_TEMPLATE(a, b)
Data_Type hasher(counter_.hasher)
return count_fun(Array, i, j, data)
Data_Type Counter_fun_type< Array_Type, Data_Type > Hasher_fun_type< Array_Type, Data_Type > Data_Type std::string name_
Data_Type &&counter_ noexcept
Data_Type Counter_fun_type< Array_Type, Data_Type > Hasher_fun_type< Array_Type, Data_Type > Data_Type data_
#define COUNTERS_TEMPLATE(a, b)
std::function< std::vector< double >(const Array_Type &, Data_Type *)> Hasher_fun_type
Hasher function used by the counter.
std::function< double(const Array_Type &, size_t, size_t, Data_Type &)> Counter_fun_type
Counter and rule functions.