PitchEstimator Class Reference

#include <PitchEstimator.h>

List of all members.

Public Member Functions

 PitchEstimator (double dEnergy1, double dPitch1, double dEnergy2, double dPitch2, double dEnergy3, double dPitch3)
 Solving system :

\[ a+b*e_1+c*e_1^2 = p_1 \]

\[ a+b*e_2+c*e_2^2 = p_2 \]

\[ a+b*e_3+c*e_3^2 = p_3 \]

.

virtual ~PitchEstimator ()
void computePitchCoefficients (double e1, double p1, double e2, double p2, double e3, double p3)
 Results of the system are :

\[a = \frac{-e_2^2*e_1*p_3+p_2*e_1*e_3^2+e_1^2*e_2*p_3-e_1^2*e_3*p_2-p_1*e_2*e_3^2+e_2^2*e_3*p_1}{e_2*e_1^2-e_2*e_3^2+e_1*e_3^2-e_1*e_2^2+e_3*e_2^2-e_3*e_1^2} \]

\[b = \frac{-e_2^2*p_1+e_2^2*p_3+p_1*e_3^2+p_2*e_1^2-p_2*e_3^2-e_1^2*p_3}{e_2*e_1^2-e_2*e_3^2+e_1*e_3^2-e_1*e_2^2+e_3*e_2^2-e_3*e_1^2} \]

\[c = -\frac{-e_2*p_1+e_3*p_1+e_2*p_3-e_1*p_3+e_1*p_2-e_3*p_2}{e_2*e_1^2-e_2*e_3^2+e_1*e_3^2-e_1*e_2^2+e_3*e_2^2-e_3*e_1^2} \]

.

double getCoefficientA ()
double getCoefficientB ()
double getCoefficientC ()

Private Attributes

double _dEnergy1
double _dEnergy2
double _dEnergy3
double _dPitch1
double _dPitch2
double _dPitch3
double _dCoeffA
double _dCoeffB
double _dCoeffC


Detailed Description

Definition at line 12 of file PitchEstimator.h.


Constructor & Destructor Documentation

PitchEstimator::PitchEstimator double  dEnergy1,
double  dPitch1,
double  dEnergy2,
double  dPitch2,
double  dEnergy3,
double  dPitch3
 

Solving system :

\[ a+b*e_1+c*e_1^2 = p_1 \]

\[ a+b*e_2+c*e_2^2 = p_2 \]

\[ a+b*e_3+c*e_3^2 = p_3 \]

.

Definition at line 16 of file PitchEstimator.cpp.

References computePitchCoefficients().

00019 {
00020         computePitchCoefficients(dEnergy1,dPitch1,dEnergy2,dPitch2,dEnergy3,dPitch3);
00021 }

Here is the call graph for this function:

PitchEstimator::~PitchEstimator  )  [virtual]
 

Definition at line 23 of file PitchEstimator.cpp.

00024 {
00025 
00026 }


Member Function Documentation

void PitchEstimator::computePitchCoefficients double  e1,
double  p1,
double  e2,
double  p2,
double  e3,
double  p3
 

Results of the system are :

\[a = \frac{-e_2^2*e_1*p_3+p_2*e_1*e_3^2+e_1^2*e_2*p_3-e_1^2*e_3*p_2-p_1*e_2*e_3^2+e_2^2*e_3*p_1}{e_2*e_1^2-e_2*e_3^2+e_1*e_3^2-e_1*e_2^2+e_3*e_2^2-e_3*e_1^2} \]

\[b = \frac{-e_2^2*p_1+e_2^2*p_3+p_1*e_3^2+p_2*e_1^2-p_2*e_3^2-e_1^2*p_3}{e_2*e_1^2-e_2*e_3^2+e_1*e_3^2-e_1*e_2^2+e_3*e_2^2-e_3*e_1^2} \]

\[c = -\frac{-e_2*p_1+e_3*p_1+e_2*p_3-e_1*p_3+e_1*p_2-e_3*p_2}{e_2*e_1^2-e_2*e_3^2+e_1*e_3^2-e_1*e_2^2+e_3*e_2^2-e_3*e_1^2} \]

.

Definition at line 33 of file PitchEstimator.cpp.

References _dCoeffA, _dCoeffB, and _dCoeffC.

Referenced by PitchEstimator().

00036 {
00037         double dDeno = e2*e1*e1-e2*e3*e3+e1*e3*e3-e1*e2*e2+e3*e2*e2-e3*e1*e1;
00038 
00039         _dCoeffA = (-e2*e2*e1*p3+p2*e1*e3*e3+e1*e1*e2*p3-e1*e1*e3*p2-p1*e2*e3*e3+e2*e2*e3*p1)/dDeno;   
00040         _dCoeffB = (-e2*e2*p1+e2*e2*p3+p1*e3*e3+p2*e1*e1-p2*e3*e3-e1*e1*p3)/dDeno;   
00041         _dCoeffC = -(-e2*p1+e3*p1+e2*p3-e1*p3+e1*p2-e3*p2)/dDeno; 
00042 }

double PitchEstimator::getCoefficientA  ) 
 

Definition at line 44 of file PitchEstimator.cpp.

References _dCoeffA.

00045 {
00046         return _dCoeffA;
00047 }

double PitchEstimator::getCoefficientB  ) 
 

Definition at line 49 of file PitchEstimator.cpp.

References _dCoeffB.

00050 {
00051         return _dCoeffB;
00052 }

double PitchEstimator::getCoefficientC  ) 
 

Definition at line 54 of file PitchEstimator.cpp.

References _dCoeffC.

00055 {
00056         return _dCoeffC;
00057 }


Member Data Documentation

double PitchEstimator::_dCoeffA [private]
 

Definition at line 34 of file PitchEstimator.h.

Referenced by computePitchCoefficients(), and getCoefficientA().

double PitchEstimator::_dCoeffB [private]
 

Definition at line 35 of file PitchEstimator.h.

Referenced by computePitchCoefficients(), and getCoefficientB().

double PitchEstimator::_dCoeffC [private]
 

Definition at line 36 of file PitchEstimator.h.

Referenced by computePitchCoefficients(), and getCoefficientC().

double PitchEstimator::_dEnergy1 [private]
 

Definition at line 27 of file PitchEstimator.h.

double PitchEstimator::_dEnergy2 [private]
 

Definition at line 28 of file PitchEstimator.h.

double PitchEstimator::_dEnergy3 [private]
 

Definition at line 29 of file PitchEstimator.h.

double PitchEstimator::_dPitch1 [private]
 

Definition at line 30 of file PitchEstimator.h.

double PitchEstimator::_dPitch2 [private]
 

Definition at line 31 of file PitchEstimator.h.

double PitchEstimator::_dPitch3 [private]
 

Definition at line 32 of file PitchEstimator.h.


The documentation for this class was generated from the following files:
Generated on Fri Jul 10 10:32:34 2009 for Utils Library by  doxygen 1.4.5