TestFunction Class Reference
Collaboration diagram for TestFunction:

Public Member Functions

 TestFunction (double frequency)
 
double operator() (double t) const
 

Private Attributes

double frequency_
 
double sin_magnitude_
 
double cos_magnitude_
 

Detailed Description

Definition at line 28 of file resample-test.cc.

Constructor & Destructor Documentation

◆ TestFunction()

TestFunction ( double  frequency)
inlineexplicit

Definition at line 30 of file resample-test.cc.

30  :
31  frequency_(frequency),
double frequency_
double sin_magnitude_
double cos_magnitude_
float RandGauss(struct RandomState *state=NULL)
Definition: kaldi-math.h:155

Member Function Documentation

◆ operator()()

double operator() ( double  t) const
inline

Definition at line 35 of file resample-test.cc.

References M_2PI.

35  {
36  double omega_t = t * M_2PI * frequency_;
37  return sin_magnitude_ * sin(omega_t)
38  + cos_magnitude_ * cos(omega_t);
39  }
double frequency_
double sin_magnitude_
double cos_magnitude_
#define M_2PI
Definition: kaldi-math.h:52

Member Data Documentation

◆ cos_magnitude_

double cos_magnitude_
private

Definition at line 43 of file resample-test.cc.

◆ frequency_

double frequency_
private

Definition at line 41 of file resample-test.cc.

◆ sin_magnitude_

double sin_magnitude_
private

Definition at line 42 of file resample-test.cc.


The documentation for this class was generated from the following file: