42 template<
typename TReal >
57 TReal t2(1 - pow( x-
mu_ , two)/ pow(
sigma_, two ) );
58 TReal t3( exp(-pow((x-
mu_) , two )/( 2 * pow(
sigma_, two ) ) ) );
59 return( t1 * t2 * t3 );
80 template<
typename TReal >
95 TReal t2(1 - pow( x-
mu_ , two)/ pow(
sigma_,two ) );
96 TReal t3( exp(-pow((x-
mu_) , two )/( 2 * pow(
sigma_, two ) ) ) );
97 return( t1 * t2 * t3 );
110 template<
typename TReal>
112 std::vector<TReal> &mh,
113 std::vector<TReal> &
x 117 TReal sum = std::accumulate(mh.begin() , mh.end() , 0.);
119 std::transform(mh.begin(),mh.end(),mh.begin(),std::bind2nd(std::minus<TReal>(), sum )) ;
123 TReal sumsq = sqrt(std::accumulate(x.begin(), x.end() , TReal(0.)));
124 std::transform(mh.begin() , mh.end() , mh.begin() , std::bind2nd(std::divides<TReal>(), sumsq ) ) ;
128 sumsq = std::accumulate(x.begin(), x.end() , TReal(0.));
133 template<
typename TReal>
137 mh.resize( x.size() );
138 std::transform( x.begin() ,x.end(),mh.begin(),mexHatGenerator);
140 TReal sum = std::accumulate(mh.begin(),mh.end(),0.);
TReal operator()(TReal x)
operator
TReal getMaxHatWorker(TReal sigma, std::vector< TReal > &mh, std::vector< TReal > &x)
Mexican_Hat(TReal mu, TReal sigma)
Mexican_Hat2(TReal mu, TReal sigma)
TReal scaleWavelet(std::vector< TReal > &mh, std::vector< TReal > &x)
Scales a mother wavelet so that the conditions hold: .
const double PI(3.14159265358979323846264338327950288)
the ratio of the circumference of a circle to its diameter;
TReal operator()(TReal x)
EQUISPACEINTERPOL Interpolation on a equidistantly spaced grid.
KernelTraitsBase< Kernel >::space_type::abscissa_type x
Mexican hat wavelet Version 2.
void filter(const TContainer &data, const TContainer &filter, TContainer &result, bool circular=false, uint32_t sides=2)
Applies linear convolution (filtering) to a univariate time series.