gamma replaced with cwt_gamma

This commit is contained in:
Rafat Hussain 2019-04-08 16:40:15 +05:30
parent e49c799ed2
commit e49f228771
4 changed files with 7 additions and 7 deletions

View File

@ -95,7 +95,7 @@ static void wave_function(int nk, double dt,int mother, double param,double scal
}
norm = sqrt(2.0*pi*scale1 / dt)*sqrt(1.0 / gamma(m + 0.50));
norm = sqrt(2.0*pi*scale1 / dt)*sqrt(1.0 / cwt_gamma(m + 0.50));
norm *= sign;
if (re == 1) {
@ -267,8 +267,8 @@ void psi0(int mother, double param,double *val,int *real) {
else {
sign = 1;
}
coeff = sign * pow(2.0, (double)m / 2) / gamma(0.5);
*val = coeff * gamma(((double)m + 1.0) / 2.0) / sqrt(gamma(m + 0.50));
coeff = sign * pow(2.0, (double)m / 2) / cwt_gamma(0.5);
*val = coeff * cwt_gamma(((double)m + 1.0) / 2.0) / sqrt(cwt_gamma(m + 0.50));
}
else {
*val = 0;

View File

@ -155,7 +155,7 @@ int nint(double N) {
return i;
}
double gamma(double x) {
double cwt_gamma(double x) {
/*
* This C program code is based on W J Cody's fortran code.
* http://www.netlib.org/specfun/gamma

View File

@ -10,7 +10,7 @@ extern "C" {
void nsfft_exec(fft_object obj, fft_data *inp, fft_data *oup,double lb,double ub,double *w);// lb -lower bound, ub - upper bound, w - time or frequency grid (Size N)
double gamma(double x);
double cwt_gamma(double x);
int nint(double N);

View File

@ -393,9 +393,9 @@ void MODWTReconstructionTest()
}
for (unsigned int direct_fft = 0; direct_fft < 2; direct_fft++)
for (unsigned int direct_fft = 0; direct_fft < 1; direct_fft++)
{
for (unsigned int sym_per = 0; sym_per < 2; sym_per++)
for (unsigned int sym_per = 0; sym_per < 1; sym_per++)
{
for (unsigned int j = 0; j < waveletNames.size(); j++)
{