mirror of
https://github.com/simon987/wavelib.git
synced 2025-04-10 14:06:46 +00:00
gamma replaced with cwt_gamma
This commit is contained in:
parent
e49c799ed2
commit
e49f228771
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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++)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user