2#include "../CalcWindow.h"
7 void set_col_taps(
const col_type& col)
16 ++_col_taps.at(col_left);
17 ++_col_taps.at(col_right);
18 _col_taps.at(col) += 2;
30 _mw_hand_taps(_col_taps.at(col_left) + _col_taps.at(col_right));
33 for (
auto& ct : ct_loop) {
34 _mw_col_taps.at(ct)(_col_taps.at(ct));
47 for (
auto& mw : _mw_col_taps) {
56 assert(ct < num_col_types);
57 return _mw_col_taps.at(ct).get_now();
63 assert(ct < num_col_types);
64 return static_cast<float>(_mw_col_taps.at(ct).get_now());
67 [[nodiscard]]
auto get_col_taps_windowi(
const col_type& ct,
68 const int& window)
const ->
int
70 assert(ct < num_col_types && window < max_moving_window_size);
71 return _mw_col_taps.at(ct).get_total_for_window(window);
76 const int& window)
const ->
float
78 assert(ct < num_col_types && window < max_moving_window_size);
79 return static_cast<float>(
80 _mw_col_taps.at(ct).get_total_for_window(window));
89 [[nodiscard]]
auto cols_equal_window(
const int& window)
const ->
bool
91 return get_col_taps_windowi(col_left, window) ==
92 get_col_taps_windowi(col_right, window);
95 [[nodiscard]]
auto get_col_prop_high_by_low() const ->
float
101 [[nodiscard]]
auto get_col_prop_low_by_high() const ->
float
107 [[nodiscard]]
auto get_col_prop_high_by_low_window(
const int& window)
const
114 [[nodiscard]]
auto get_col_prop_low_by_high_window(
const int& window)
const
121 [[nodiscard]]
auto get_col_diff_high_by_low() const ->
int
127 [[nodiscard]]
auto get_col_diff_high_by_low_window(
const int& window)
const
130 return diff_high_by_low(get_col_taps_windowi(col_left, window),
131 get_col_taps_windowi(col_right, window));
137 return _mw_hand_taps.
get_now();
143 return static_cast<float>(_mw_hand_taps.
get_now());
146 [[nodiscard]]
auto get_taps_windowi(
const int& window)
const ->
int
148 assert(window < max_moving_window_size);
155 assert(window < max_moving_window_size);
160 std::array<int, num_col_types> _col_taps = { 0, 0, 0 };
166 std::array<CalcMovingWindow<int>, num_col_types> _mw_col_taps;
Definition CalcWindow.h:15
void zero()
set everything to zero
Definition CalcWindow.h:210
auto get_total_for_window(const int &window) const -> T
get the sum for the moving window up to a given size
Definition CalcWindow.h:46
auto get_now() const -> T
get most recent value in moving window
Definition CalcWindow.h:38
accumulates hand specific info across an interval as it's processed by row
Definition IntervalHandInfo.h:6
auto get_taps_nowi() const -> int
access functions for hand tap counts
Definition IntervalHandInfo.h:135
auto get_col_taps_nowi(const col_type &ct) const -> int
access functions for col tap counts
Definition IntervalHandInfo.h:54
void zero()
Definition IntervalHandInfo.h:43
auto get_col_taps_windowf(const col_type &ct, const int &window) const -> float
cast to float for divisioning and clean screen
Definition IntervalHandInfo.h:75
auto get_taps_windowf(const int &window) const -> float
cast to float for divisioning and clean screen
Definition IntervalHandInfo.h:153
void interval_end()
handle end of interval behavior here
Definition IntervalHandInfo.h:27
auto get_col_taps_nowf(const col_type &ct) const -> float
cast to float for divisioning and clean screen
Definition IntervalHandInfo.h:61
auto cols_equal_now() const -> bool
col operations
Definition IntervalHandInfo.h:84
auto get_taps_nowf() const -> float
cast to float for divisioning and clean screen
Definition IntervalHandInfo.h:141