|
AudioDataLib
A C++ library of classes supporting a variety of audio-data tasks.
|
Instances of this class represent complex numbers in the complex plane. More...
#include <ComplexNumber.h>
Public Member Functions | |
| ComplexNumber () | |
| ComplexNumber (const ComplexNumber &complexNumber) | |
| ComplexNumber (double realPart, double imagPart) | |
| virtual | ~ComplexNumber () |
| void | operator= (const ComplexNumber &complexNumber) |
| void | operator+= (const ComplexNumber &complexNumber) |
| void | operator-= (const ComplexNumber &complexNumber) |
| void | operator*= (const ComplexNumber &complexNumber) |
| void | operator/= (const ComplexNumber &complexNumber) |
| void | operator+= (double realNumber) |
| void | operator-= (double realNumber) |
| void | operator*= (double realNumber) |
| void | operator/= (double realNumber) |
| bool | operator== (const ComplexNumber &complexNumber) const |
| bool | operator!= (const ComplexNumber &complexNumber) const |
| operator std::string () const | |
| void | Exp (const ComplexNumber &complexNumber) |
| void | Exp (double realNumber) |
| void | ExpI (double realNumber) |
| void | Log (const ComplexNumber &complexNumber) |
| void | Log (double realNumber) |
| void | LogI (double realNumber) |
| ComplexNumber | Conjugate () const |
| ComplexNumber | Inverse () const |
| double | SquareMagnitude () const |
| double | Magnitude () const |
| double | Angle () const |
Public Attributes | |
| double | realPart |
| The real component of this complex number. | |
| double | imagPart |
| The imaginary component (or real multiple of the imaginary unit) of this complex number. | |
Instances of this class represent complex numbers in the complex plane.
Interestingly, complex numbers show up in the analysis of wave-forms; particularly when an FFT (fast forier transform) is performed.
| ComplexNumber::ComplexNumber | ( | ) |
The default constructor always initializes this complex number to zero.
| ComplexNumber::ComplexNumber | ( | const ComplexNumber & | complexNumber | ) |
Initialize this complex number as a copy of the given complex number.
| ComplexNumber::ComplexNumber | ( | double | realPart, |
| double | imagPart ) |
Initialize this complex number with the given components.
|
virtual |
| double ComplexNumber::Angle | ( | ) | const |
Calculate and return the angle (in [0,2pi)) made by this complex number when compared to the +X axis.
| ComplexNumber ComplexNumber::Conjugate | ( | ) | const |
Calculate and return the conjugate of this complex number.
| void ComplexNumber::Exp | ( | const ComplexNumber & | complexNumber | ) |
Make this complex number the base of the natural logarithm raised to the power of the given complex number.
| void ComplexNumber::Exp | ( | double | realNumber | ) |
Make this complex number the base of the natural logarithm raised to the power of the given real number.
| void ComplexNumber::ExpI | ( | double | realNumber | ) |
Make this complex number the base of the natural logarithm raised to the power of the given imaginary number (or real multiple of the imaginary unit.)
| ComplexNumber ComplexNumber::Inverse | ( | ) | const |
Calculate and return the multiplicative inverse of this complex number.
| void ComplexNumber::Log | ( | const ComplexNumber & | complexNumber | ) |
Make this complex number the natural logarithm of the given complex number.
| void ComplexNumber::Log | ( | double | realNumber | ) |
Make this complex number the natural logarithm of the given real number.
| void ComplexNumber::LogI | ( | double | realNumber | ) |
Make this complex number the natural logarithm of the given imaginary number (or real multiple of the imaginary unit.)
| double ComplexNumber::Magnitude | ( | ) | const |
Calculate and return the magnitude of this complex number.
| ComplexNumber::operator std::string | ( | ) | const |
| bool ComplexNumber::operator!= | ( | const ComplexNumber & | complexNumber | ) | const |
| void ComplexNumber::operator*= | ( | const ComplexNumber & | complexNumber | ) |
| void ComplexNumber::operator*= | ( | double | realNumber | ) |
| void ComplexNumber::operator+= | ( | const ComplexNumber & | complexNumber | ) |
| void ComplexNumber::operator+= | ( | double | realNumber | ) |
| void ComplexNumber::operator-= | ( | const ComplexNumber & | complexNumber | ) |
| void ComplexNumber::operator-= | ( | double | realNumber | ) |
| void ComplexNumber::operator/= | ( | const ComplexNumber & | complexNumber | ) |
| void ComplexNumber::operator/= | ( | double | realNumber | ) |
| void ComplexNumber::operator= | ( | const ComplexNumber & | complexNumber | ) |
| bool ComplexNumber::operator== | ( | const ComplexNumber & | complexNumber | ) | const |
| double ComplexNumber::SquareMagnitude | ( | ) | const |
Calculate and return the square magnitude of this complex number.
| double AudioDataLib::ComplexNumber::imagPart |
The imaginary component (or real multiple of the imaginary unit) of this complex number.
| double AudioDataLib::ComplexNumber::realPart |
The real component of this complex number.