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

	return 0;
}
/** 
  * ComplexMultiplication.
  * The result is stored in the a and b arrays. \f[ (a+ib)(c+id)=(ac+bd)+i(bc+ad) \f]
  * 
  * @param a The real part of the first signal
  * @param b The imaginary parto fo the first signal
  * @param c The real part of the second signal
  * @param d The imaginary part of the second signal
  * 
  * @return 0
  */


@param a The real part of the first signal
@param b The imaginary parto fo the first signal
@param c The real part of the second signal
@param d The imaginary part of the second signal

@return 0
@param a The real part of the first signal @param b The imaginary parto fo the first signal @param c The real part of the second signal @param d The imaginary part of the second signal @return 0
int 
SoundProcessing::ComplexMultiplication(double * a, double * b, double * c, double * d)
{
	double temp_a;
	for	(int i = 0; i < numSamples; i++) 
	{
		temp_a = (*a);
		*(a)   = ((*a) * (*c) + (*b)     * (*d))/numSamples;
		*(b)   = ((*b) * (*c) + (temp_a) * (*d))/numSamples;
		a++; b++; c++; d++;
	}
	return 0;
}
int SoundProcessing :: ComplexMultiplication ( double * a , double * b , double * c , double * d ) { double temp_a ; for ( int i = 0 ; i < numSamples ; i ++ ) { temp_a = ( * a ) ; * ( a ) = ( ( * a ) * ( * c ) + ( * b ) * ( * d ) ) / numSamples ; * ( b ) = ( ( * b ) * ( * c ) + ( temp_a ) * ( * d ) ) / numSamples ; a ++ ; b ++ ; c ++ ; d ++ ; } return 0 ; }
ComplexMultiplication.
ComplexMultiplication .