src/experiments/babybot/soundlocalization/soundprocessing.cpp
int 
SoundProcessing::ConjComplexMultiplication(double * a, double * b,
										   double * c, double * d,
										   double * ans_Re , double * ans_Im)
{
	for	( int i = 0; i < numSamples; i++) 
	{
		*(ans_Re+i) = ((*a) * (*c) + (*b) * (*d))/numSamples;
		*(ans_Im+i) = ((*b) * (*c) - (*a) * (*d))/numSamples;
		a++; b++; c++; d++;
	}

	return 0;
}
/** 
  * Multiplication between the spectrum of the first signal and the complex conjugation
  * of the spectrum of the second (discrete correlation theorem).
  * Have a look at Numerical Recipies book. Chapter "Correlation and Autocorrelation
  * using the Fast Fourier Transform (pag 545).
  * \f[ (a+ib)(c-id)=(ac+bd)+i(bc-ad) \f]
  * @param a The real part of the first signal
  * @param b The imaginary part of the first signal
  * @param c The real part of the second signal
  * @param d The imaginary part of the second signal
  * @param ans_Re The real part of the answer
  * @param ans_Im The imaginary part of the answer
  * 
  * @return 0
  */
Multiplication between the spectrum of the first signal and the complex conjugation
of the spectrum of the second (discrete correlation theorem).
Have a look at Numerical Recipies book. Chapter "Correlation and Autocorrelation
using the Fast Fourier Transform (pag 545).

@return 0
Multiplication between the spectrum of the first signal and the complex conjugation of the spectrum of the second ( discrete correlation theorem ) . Have a look at Numerical Recipies book . Chapter " Correlation and Autocorrelation using the Fast Fourier Transform ( pag 545 ) . @return 0
int 
SoundProcessing::ConjComplexMultiplication(double * a, double * b,
										   double * c, double * d,
										   double * ans_Re , double * ans_Im)
{
	for	( int i = 0; i < numSamples; i++) 
	{
		*(ans_Re+i) = ((*a) * (*c) + (*b) * (*d))/numSamples;
		*(ans_Im+i) = ((*b) * (*c) - (*a) * (*d))/numSamples;
		a++; b++; c++; d++;
	}
	return 0;
}
int SoundProcessing :: ConjComplexMultiplication ( double * a , double * b , double * c , double * d , double * ans_Re , double * ans_Im ) { for ( int i = 0 ; i < numSamples ; i ++ ) { * ( ans_Re + i ) = ( ( * a ) * ( * c ) + ( * b ) * ( * d ) ) / numSamples ; * ( ans_Im + i ) = ( ( * b ) * ( * c ) - ( * a ) * ( * d ) ) / numSamples ; a ++ ; b ++ ; c ++ ; d ++ ; } return 0 ; }
Multiplication between the spectrum of the first signal and the complex conjugation
 of the spectrum of the second (discrete correlation theorem).
Multiplication between the spectrum of the first signal and the complex conjugation of the spectrum of the second ( discrete correlation theorem ) .