Skip to content

Commit

Permalink
housekeeping: disable some unused c++ code
Browse files Browse the repository at this point in the history
  • Loading branch information
lschneiderbauer committed Dec 28, 2024
1 parent e9ae4e4 commit 2ec2be6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
12 changes: 9 additions & 3 deletions src/fcwt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ void Morlet::generate(int size) {
mother[w] = (norm*exp(tmp1));
}
}

/*
void Morlet::generate(float* real, float* imag, int size, float scale) {
//Time domain because we know size from scale
float tmp1, tmp2;
Expand Down Expand Up @@ -106,6 +108,7 @@ void Morlet::getWavelet(float scale, complex<float>* pwav, int pn) {
free(real);
free(imag);
};
*/

//==============================================================//
//================== Scales =====================================//
Expand All @@ -120,13 +123,14 @@ Scales::Scales(Wavelet *wav, SCALETYPE st, int afs, float af0, float af1, int af

if(st==SCALETYPE::FCWT_LOGSCALES)
calculate_logscale_array(2.0f, wav->four_wavelen, afs, af0, af1, afn);
else if(st==SCALETYPE::FCWT_LINSCALES)
calculate_linscale_array(wav->four_wavelen, afs, af0, af1, afn);
// else if(st==SCALETYPE::FCWT_LINSCALES)
// calculate_linscale_array(wav->four_wavelen, afs, af0, af1, afn);
else
calculate_linfreq_array(wav->four_wavelen, afs, af0, af1, afn);

}

/*
void Scales::getScales(float *pfreqs, int pnf) {
for(int i=0;i<pnf;i++) {
pfreqs[i]=scales[i];
Expand All @@ -138,6 +142,7 @@ void Scales::getFrequencies(float *pfreqs, int pnf) {
pfreqs[i]=((float)fs)/scales[i];
};
};
*/

void Scales::calculate_logscale_array(float base, float four_wavl, int fs, float f0, float f1, int fn) {

Expand Down Expand Up @@ -182,6 +187,7 @@ void Scales::calculate_linfreq_array(float four_wavl, int fs, float f0, float f1
}
}

/*
void Scales::calculate_linscale_array(float four_wavl, int fs, float f0, float f1, int fn) {
float nf0 = f0;
Expand All @@ -202,7 +208,7 @@ void Scales::calculate_linscale_array(float four_wavl, int fs, float f0, float f
scales[i] = (s0 + (ds/fn)*i);
}
}

*/

//==============================================================//
//================== FCWT =====================================//
Expand Down
10 changes: 5 additions & 5 deletions src/fcwt.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ class Morlet : public Wavelet {
~Morlet() { free(mother); };

void generate(int size); //frequency domain
void generate(float* real, float* imag, int size, float scale); //time domain
// void generate(float* real, float* imag, int size, float scale); //time domain
int getSupport(float scale) { return (int)(fb*scale*3.0f); };
void getWavelet(float scale, complex<float>* pwav, int pn);
// void getWavelet(float scale, complex<float>* pwav, int pn);
float fb;

private:
Expand All @@ -120,8 +120,8 @@ class Scales {
public:
FCWT_LIBRARY_API Scales(Wavelet *pwav, SCALETYPE st, int fs, float f0, float f1, int fn);

void FCWT_LIBRARY_API getScales(float *pfreqs, int pnf);
void FCWT_LIBRARY_API getFrequencies(float *pfreqs, int pnf);
// void FCWT_LIBRARY_API getScales(float *pfreqs, int pnf);
// void FCWT_LIBRARY_API getFrequencies(float *pfreqs, int pnf);

float* scales;
int fs;
Expand All @@ -130,7 +130,7 @@ class Scales {

private:
void calculate_logscale_array(float base, float four_wavl, int fs, float f0, float f1, int fn);
void calculate_linscale_array(float four_wavl, int fs, float f0, float f1, int fn);
// void calculate_linscale_array(float four_wavl, int fs, float f0, float f1, int fn);
void calculate_linfreq_array(float four_wavl, int fs, float f0, float f1, int fn);
};

Expand Down

0 comments on commit 2ec2be6

Please sign in to comment.