|
AudioDataLib
A C++ library of classes supporting a variety of audio-data tasks.
|
These can be imagined as row (or column) vectors having complex-valued elements. More...
#include <ComplexVector.h>
Public Member Functions | |
| ComplexVector () | |
| ComplexVector (const ComplexVector &complexVector) | |
| virtual | ~ComplexVector () |
| void | Clear () |
| void | Add (const ComplexNumber &complexNumber) |
| uint32_t | Size () const |
| void | operator= (const ComplexVector &complexVector) |
| const ComplexNumber & | operator[] (uint32_t i) const |
| ComplexNumber & | operator[] (uint32_t i) |
| bool | FFT (const ComplexVector &complexVector, bool inverse, Error &error) |
Protected Attributes | |
| std::vector< ComplexNumber > * | complexNumberArray |
These can be imagined as row (or column) vectors having complex-valued elements.
A typical use-case is to populate the vector with audio samples, then to perform an FFT.
| ComplexVector::ComplexVector | ( | ) |
Construct a new empty vector.
| ComplexVector::ComplexVector | ( | const ComplexVector & | complexVector | ) |
Construct a new vector as a copy of the given vector.
|
virtual |
| void ComplexVector::Add | ( | const ComplexNumber & | complexNumber | ) |
Append a new complex number to the vector.
| void ComplexVector::Clear | ( | ) |
Remove all complex numbers from this vector, making it empty.
| bool ComplexVector::FFT | ( | const ComplexVector & | complexVector, |
| bool | inverse, | ||
| Error & | error ) |
Perform a Fast Fourier Transform on the given complex vector, placing the result in this complex vector.
| [in] | complexVector | This is the complex vector to be transformed. |
| [in] | inverse | If true, an inverse-FFT is performed; a regular FFT otherwise. |
| [out] | error | This will contain error information if false is returned. |
| void ComplexVector::operator= | ( | const ComplexVector & | complexVector | ) |
Assign the given complex vector to this one, making a copy.
| ComplexNumber & ComplexVector::operator[] | ( | uint32_t | i | ) |
Return the complex number at the given offset in this vector.
| [in] | i | This is the offset of the desired vector. If it is out of range, your program will crash. |
| const ComplexNumber & ComplexVector::operator[] | ( | uint32_t | i | ) | const |
Return the (read-only) complex number at the given offset in this vector.
| [in] | i | This is the offset of the desired vector. If it is out of range, your program will crash. |
| uint32_t ComplexVector::Size | ( | ) | const |
Return the number of elements (complex numbers) in the vector.
|
protected |