48 #ifndef MUI_SAMPLER_MOVING_AVG_H_
49 #define MUI_SAMPLER_MOVING_AVG_H_
51 #include "../../config.h"
52 #include "../sampler.h"
57 template<
typename CONFIG=default_config,
typename O_TP=
typename CONFIG::REAL,
typename I_TP=O_TP>
62 using REAL =
typename CONFIG::REAL;
63 using INT =
typename CONFIG::INT;
70 template<
template<
typename,
typename>
class CONTAINER>
74 for(
size_t i = 0 ; i < data_points.size() ; i++ ) {
76 for (
INT j = 0 ; j < CONFIG::D ; j++) {
77 dx[j] = std::fabs(data_points[i].first[j] - focus[j]);
80 for(
INT i = 0 ; within && i < CONFIG::D ; i++ ) within = within && ( dx[i] <
bbox[i] );
82 vsum += data_points[i].second;
86 if (CONFIG::DEBUG) assert( n!=0 );
Definition: geometry.h:92
Definition: geometry.h:188
Definition: sampler_mov_avg.h:58
O_TP OTYPE
Definition: sampler_mov_avg.h:60
OTYPE filter(point_type focus, const CONTAINER< ITYPE, CONFIG > &data_points) const
Definition: sampler_mov_avg.h:71
typename CONFIG::point_type point_type
Definition: sampler_mov_avg.h:64
point_type bbox
Definition: sampler_mov_avg.h:95
sampler_moving_average(point_type bbox_)
Definition: sampler_mov_avg.h:66
geometry::any_shape< CONFIG > support(point_type focus, REAL domain_mag) const
Definition: sampler_mov_avg.h:90
I_TP ITYPE
Definition: sampler_mov_avg.h:61
typename CONFIG::INT INT
Definition: sampler_mov_avg.h:63
typename CONFIG::REAL REAL
Definition: sampler_mov_avg.h:62