48 #ifndef MUI_TEMPORAL_SAMPLER_MEAN_H_
49 #define MUI_TEMPORAL_SAMPLER_MEAN_H_
51 #include "../../general/util.h"
52 #include "../../config.h"
58 using REAL =
typename CONFIG::REAL;
59 using INT =
typename CONFIG::INT;
69 template<
typename TYPE>
70 TYPE
filter(
time_type focus,
const std::vector<std::pair<std::pair<time_type,iterator_type>, TYPE> > &points )
const {
73 for(
auto i: points ) {
74 if ( i.first.first <= focus +
right_ && i.first.first >= focus -
left_ ) {
80 return sum / TYPE(points.size());
86 template<
typename TYPE>
87 TYPE
filter( std::pair<time_type,iterator_type> focus,
const std::vector<std::pair<std::pair<time_type,iterator_type>, TYPE> > &points )
const {
90 for(
auto i: points ) {
91 if ( i.first.first <= focus.first +
right_ && i.first.first >= focus.first -
left_ ) {
97 return sum / TYPE(points.size());
107 return focus -
left_;
Definition: temporal_sampler_mean.h:56
temporal_sampler_mean(time_type left=time_type(0), time_type right=time_type(0))
Definition: temporal_sampler_mean.h:63
time_type right_
Definition: temporal_sampler_mean.h:116
time_type tolerance() const
Definition: temporal_sampler_mean.h:110
typename CONFIG::time_type time_type
Definition: temporal_sampler_mean.h:60
typename CONFIG::REAL REAL
Definition: temporal_sampler_mean.h:58
time_type get_upper_bound(time_type focus) const
Definition: temporal_sampler_mean.h:102
time_type get_lower_bound(time_type focus) const
Definition: temporal_sampler_mean.h:106
TYPE filter(std::pair< time_type, iterator_type > focus, const std::vector< std::pair< std::pair< time_type, iterator_type >, TYPE > > &points) const
Definition: temporal_sampler_mean.h:87
typename CONFIG::INT INT
Definition: temporal_sampler_mean.h:59
time_type left_
Definition: temporal_sampler_mean.h:115
typename CONFIG::iterator_type iterator_type
Definition: temporal_sampler_mean.h:61
TYPE filter(time_type focus, const std::vector< std::pair< std::pair< time_type, iterator_type >, TYPE > > &points) const
Definition: temporal_sampler_mean.h:70
SCALAR sum(vexpr< E, SCALAR, D > const &u)
Definition: point.h:362