48 #ifndef MUI_SAMPLER_SUM_QUINTIC_H_
49 #define MUI_SAMPLER_SUM_QUINTIC_H_
51 #include "../../general/util.h"
52 #include "../../config.h"
53 #include "../sampler.h"
58 template<
typename CONFIG=default_config,
typename O_TP=
typename CONFIG::REAL,
typename I_TP=O_TP>
64 using REAL =
typename CONFIG::REAL;
65 using INT =
typename CONFIG::INT;
67 const static int D = CONFIG::D;
71 static_assert(
D == 1 ||
D == 2 ||
D == 3,
"Quintic kernel for dimension other than 1,2,3 not defined." );
78 sigma = 7.0 / 478.0 / PI;
81 sigma = 1.0 / 120.0 / PI;
87 template<
template<
typename,
typename>
class CONTAINER>
91 for(
size_t i = 0 ; i < data_points.size() ; i++ ) {
92 auto dist2 =
normsq( focus - data_points[i].first );
95 vsum += data_points[i].second * w;
113 REAL s1_5, s2_5, s3_5;
118 s1_5 = 15.0 * powr<5>( s1 );
119 s2_5 = -6.0 * powr<5>( s2 );
120 s3_5 = powr<5>( s3 );
122 w = s3_5 + s2_5 + s1_5;
123 }
else if( s < 2.0 ) {
125 }
else if( s < 3.0 ) {
Definition: geometry.h:92
Definition: geometry.h:158
Definition: sampler_sum_quintic.h:60
I_TP ITYPE
Definition: sampler_sum_quintic.h:63
typename CONFIG::point_type point_type
Definition: sampler_sum_quintic.h:66
O_TP OTYPE
Definition: sampler_sum_quintic.h:62
typename CONFIG::REAL REAL
Definition: sampler_sum_quintic.h:64
REAL quintic_polynomial(const REAL dist) const
Definition: sampler_sum_quintic.h:109
sampler_sum_quintic(REAL r_)
Definition: sampler_sum_quintic.h:69
typename CONFIG::INT INT
Definition: sampler_sum_quintic.h:65
OTYPE filter(point_type focus, const CONTAINER< ITYPE, CONFIG > &data_points) const
Definition: sampler_sum_quintic.h:88
REAL norm_factor
Definition: sampler_sum_quintic.h:107
geometry::any_shape< CONFIG > support(point_type focus, REAL domain_mag) const
Definition: sampler_sum_quintic.h:101
REAL r
Definition: sampler_sum_quintic.h:107
static const int D
Definition: sampler_sum_quintic.h:67
REAL hinv
Definition: sampler_sum_quintic.h:107
SCALAR normsq(vexpr< E, SCALAR, D > const &u)
Definition: point.h:380