OpenWareLaboratory
|
Public Member Functions | |
void | add (ComplexFloatArray operand2) |
In-place element-wise sum between complex arrays. More... | |
void | add (ComplexFloatArray operand2, ComplexFloatArray destination) |
Element-wise sum between complex arrays. More... | |
void | clear () |
void | complexByComplexMultiplication (ComplexFloatArray operand2, ComplexFloatArray result) |
Complex by complex multiplication between arrays. More... | |
void | complexByRealMultiplication (FloatArray operand2, ComplexFloatArray result) |
Complex by real multiplication between arrays. More... | |
void | complexDotProduct (ComplexFloatArray operand2, ComplexFloat &result) |
Complex dot product between arrays. More... | |
ComplexFloatArray () | |
ComplexFloatArray (ComplexFloat *data, size_t size) | |
void | copyFrom (FloatArray real, FloatArray imag) |
Merge two channels of audio containing real and imaginary axis data into this array. More... | |
void | copyFrom (SimpleArray< ComplexFloat > source) |
Copies the content of another array into this array. More... | |
void | copyTo (FloatArray real, FloatArray imag) |
Split complex data into two channels of audio containing real and imaginary axis data. More... | |
void | copyTo (SimpleArray< ComplexFloat > destination) |
Copies the content of this array to another array. More... | |
bool | equals (const SimpleArray< ComplexFloat > &other) const |
Compares two arrays. More... | |
void | fromFloat (FloatArray source) |
Copies real values from a FloatArray, sets imaginary values to 0. More... | |
void | getComplexConjugateValues (ComplexFloatArray destination) |
The complex conjugate values of the element of the array. More... | |
ComplexFloat * | getData () |
Get the data stored in the Array. More... | |
ComplexFloat | getElement (size_t index) |
Get a single value stored in the array. More... | |
void | getImaginaryValues (FloatArray buf) |
Get the imaginary part of the elements of the array. More... | |
void | getMagnitudeSquaredValues (FloatArray destination) |
The squared magnitudes of the elements of the array. More... | |
void | getMagnitudeValues (FloatArray destination) |
The magnitudes of the elements of the array. More... | |
int | getMaxMagnitudeIndex () |
The index of the element with the maximum magnitude in the array. More... | |
float | getMaxMagnitudeValue () |
The value of the element with the maximum magnitude in the array. More... | |
void | getPhaseValues (FloatArray destination) |
The phases of the elements of the array. More... | |
void | getPolar (FloatArray magnitude, FloatArray phase) |
Get polar coordinates for all the elements in the array. More... | |
void | getRealValues (FloatArray buf) |
Get the real part of the elements of the array. More... | |
size_t | getSize () const |
float | im (const int i) |
Get the imaginary part of an element of the array. More... | |
void | insert (SimpleArray< ComplexFloat > source, int destinationOffset, size_t len) |
Copies the content of an array into a subset of the array. More... | |
void | insert (SimpleArray< ComplexFloat > source, int sourceOffset, int destinationOffset, size_t len) |
Copies the content of an array into a subset of the array. More... | |
bool | isEmpty () const |
float | mag (const int i) |
Get the magnitude of an element of the array. More... | |
float | mag2 (const int i) |
The magnitude squared of an element of the array. More... | |
void | move (int fromIndex, int toIndex, size_t len) |
Copies values within an array. More... | |
operator ComplexFloat * () | |
Casting operator to T*. More... | |
float | re (const int i) |
Get the real part of an element of the array. More... | |
void | scale (float factor) |
Array by scalar multiplication. More... | |
void | setAll (ComplexFloat value) |
Set all the elements in the array. More... | |
void | setAll (float value) |
Set all the elements in the array. More... | |
void | setAll (float valueRe, float valueIm) |
Set all the elements in the array. More... | |
void | setElement (size_t index, ComplexFloat value) |
Set a single value in the array. More... | |
void | setMagnitude (FloatArray magnitude) |
Set the magnitude of the elements of the array, leaving the phase unchanged. More... | |
void | setMagnitude (FloatArray magnitude, ComplexFloatArray destination) |
Set the magnitude of the elements of an array, using the phase from the current array. More... | |
void | setMagnitude (FloatArray magnitude, int offset, size_t count) |
Set the magnitude of a range of elements of the array, leaving the phase unchanged. More... | |
void | setMagnitude (FloatArray magnitude, int offset, size_t count, ComplexFloatArray destination) |
Set the magnitude of a range of the elements of an array, using the phases from the current array. More... | |
void | setPhase (FloatArray phase) |
Set the phase of the elements of the array, leaving the magnitude unchanged. More... | |
void | setPhase (FloatArray phase, ComplexFloatArray destination) |
Set the phase of the elements of an array, using the magnitude from the current array. More... | |
void | setPhase (FloatArray phase, int offset, size_t count) |
Set the phase of a range of elements of the array, leaving the magnitude unchanged. More... | |
void | setPhase (FloatArray phase, int offset, size_t count, ComplexFloatArray destination) |
Set the phase of a range of the elements of an array, using the magnitude from the current array. More... | |
void | setPolar (FloatArray magnitude, FloatArray phase) |
Set all the elements in the array using polar coordinates. More... | |
void | setPolar (FloatArray magnitude, FloatArray phase, int offset, size_t count) |
Set a range of elements in the array using polar coordinates. More... | |
ComplexFloatArray | subArray (int offset, size_t length) |
A subset of the array. More... | |
void | subtract (ComplexFloatArray operand2) |
In-place element-wise difference between complex arrays. More... | |
void | subtract (ComplexFloatArray operand2, ComplexFloatArray destination) |
Element-wise difference between complex arrays. More... | |
void | toFloat (FloatArray destination) |
Copies real and imaginary values of the ComplexFloatArray into a FloatArray. More... | |
Static Public Member Functions | |
static void | copy (ComplexFloat *dst, ComplexFloat *src, size_t len) |
Optimised array copy for datatype T. More... | |
static ComplexFloatArray | create (size_t size) |
Creates a new ComplexFloatArray. More... | |
static void | destroy (ComplexFloatArray) |
Destroys a ComplexFloatArray created with the create() method. More... | |
Protected Attributes | |
ComplexFloat * | data |
size_t | size |
Definition at line 205 of file ComplexFloatArray.h.
|
inline |
Definition at line 207 of file ComplexFloatArray.h.
Referenced by subArray().
|
inline |
Definition at line 208 of file ComplexFloatArray.h.
void ComplexFloatArray::add | ( | ComplexFloatArray | operand2 | ) |
In-place element-wise sum between complex arrays.
Adds each element of operand2 to the corresponding element in the array.
operand2 | second operand for the sum |
Definition at line 113 of file ComplexFloatArray.cpp.
References add().
void ComplexFloatArray::add | ( | ComplexFloatArray | operand2, |
ComplexFloatArray | destination | ||
) |
Element-wise sum between complex arrays.
Sets each element in destination to the complex sum of the corresponding element of the array and operand2
[in] | operand2 | second operand for the sum |
[out] | destination | the destination array |
Definition at line 101 of file ComplexFloatArray.cpp.
References ASSERT, SimpleArray< ComplexFloat >::data, SimpleArray< T >::getData(), SimpleArray< ComplexFloat >::getData(), ComplexFloat::im, im(), ComplexFloat::re, re(), SimpleArray< ComplexFloat >::size, and SimpleArray< T >::size.
Referenced by add().
|
inline |
void ComplexFloatArray::complexByComplexMultiplication | ( | ComplexFloatArray | operand2, |
ComplexFloatArray | result | ||
) |
Complex by complex multiplication between arrays.
[in] | operand2 | The second operand of the multiplication |
[out] | result | The array where the result of the multiplication is stored |
Definition at line 85 of file ComplexFloatArray.cpp.
References ASSERT, SimpleArray< T >::getData(), SimpleArray< ComplexFloat >::getData(), SimpleArray< ComplexFloat >::size, and SimpleArray< T >::size.
void ComplexFloatArray::complexByRealMultiplication | ( | FloatArray | operand2, |
ComplexFloatArray | result | ||
) |
Complex by real multiplication between arrays.
[in] | operand2 | The second operand of the multiplication |
[out] | result | The array where the result of the multiplication is stored |
Definition at line 148 of file ComplexFloatArray.cpp.
References ASSERT, SimpleArray< T >::getData(), SimpleArray< ComplexFloat >::getData(), SimpleArray< T >::getSize(), and SimpleArray< ComplexFloat >::size.
void ComplexFloatArray::complexDotProduct | ( | ComplexFloatArray | operand2, |
ComplexFloat & | result | ||
) |
Complex dot product between arrays.
[in] | operand2 | The second operand of the dot product |
[out] | result | The array where the result of the dot product is stored |
Definition at line 67 of file ComplexFloatArray.cpp.
References SimpleArray< T >::getData(), SimpleArray< ComplexFloat >::getData(), ComplexFloat::im, ComplexFloat::re, and SimpleArray< ComplexFloat >::size.
|
inlinestaticinherited |
Optimised array copy for datatype T.
Copy four at a time to minimise loop overheads and allow SIMD optimisations. This performs well on external RAM but is slower on internal memory compared to memcpy.
Definition at line 134 of file SimpleArray.h.
void ComplexFloatArray::copyFrom | ( | FloatArray | real, |
FloatArray | imag | ||
) |
Merge two channels of audio containing real and imaginary axis data into this array.
[in] | real | Real axis data |
[in] | imag | Imaginary axis data |
Definition at line 316 of file ComplexFloatArray.cpp.
References SimpleArray< ComplexFloat >::data, and SimpleArray< ComplexFloat >::getSize().
Referenced by ComplexFourierTransform::fft(), and ComplexFourierTransform::ifft().
|
inlineinherited |
Copies the content of another array into this array.
This array needs to be at least as big as the other array.
[in] | source | the source array |
Definition at line 86 of file SimpleArray.h.
void ComplexFloatArray::copyTo | ( | FloatArray | real, |
FloatArray | imag | ||
) |
Split complex data into two channels of audio containing real and imaginary axis data.
[in] | real | Real axis data |
[in] | imag | Imaginary axis data |
Definition at line 322 of file ComplexFloatArray.cpp.
References SimpleArray< ComplexFloat >::data, SimpleArray< ComplexFloat >::getSize(), ComplexFloat::im, and ComplexFloat::re.
|
inlineinherited |
Copies the content of this array to another array.
The other array needs to be at least as big as this array.
[out] | destination | the destination array |
Definition at line 76 of file SimpleArray.h.
|
static |
Creates a new ComplexFloatArray.
Allocates size*sizeof(float) bytes of memory and returns a ComplexFloatArray that points to it.
size | The size of the new ComplexFloatArray. |
size
is initialized to the proper value. Definition at line 306 of file ComplexFloatArray.cpp.
References clear(), and SimpleArray< ComplexFloat >::size.
Referenced by FourierPitchDetector::init(), ComplexFourierTransform::init(), and FastFourierTransform::init().
|
static |
Destroys a ComplexFloatArray created with the create() method.
array | The ComplexFloatArray to be destroyed. |
Definition at line 312 of file ComplexFloatArray.cpp.
References SimpleArray< T >::data.
Referenced by ComplexFourierTransform::~ComplexFourierTransform(), FastFourierTransform::~FastFourierTransform(), and FourierPitchDetector::~FourierPitchDetector().
|
inlineinherited |
Compares two arrays.
Performs an element-wise comparison of the values contained in the arrays.
other | the array to compare against. |
Definition at line 61 of file SimpleArray.h.
void ComplexFloatArray::fromFloat | ( | FloatArray | source | ) |
Copies real values from a FloatArray, sets imaginary values to 0.
[in] | source | The source array |
Definition at line 218 of file ComplexFloatArray.cpp.
References ASSERT, SimpleArray< ComplexFloat >::data, SimpleArray< T >::getSize(), ComplexFloat::im, ComplexFloat::re, and SimpleArray< ComplexFloat >::size.
void ComplexFloatArray::getComplexConjugateValues | ( | ComplexFloatArray | destination | ) |
The complex conjugate values of the element of the array.
[out] | destination | The array where the complex conjugate values will be stored. |
Definition at line 133 of file ComplexFloatArray.cpp.
References ASSERT, SimpleArray< T >::getData(), SimpleArray< ComplexFloat >::getData(), SimpleArray< T >::getSize(), and SimpleArray< ComplexFloat >::size.
|
inlineinherited |
Get the data stored in the Array.
Definition at line 27 of file SimpleArray.h.
|
inlineinherited |
Get a single value stored in the array.
index |
Definition at line 43 of file SimpleArray.h.
void ComplexFloatArray::getImaginaryValues | ( | FloatArray | buf | ) |
Get the imaginary part of the elements of the array.
[out] | buf | The array where the imaginary part will be stored. |
Definition at line 200 of file ComplexFloatArray.cpp.
References SimpleArray< ComplexFloat >::data, ComplexFloat::im, and SimpleArray< ComplexFloat >::size.
void ComplexFloatArray::getMagnitudeSquaredValues | ( | FloatArray | destination | ) |
The squared magnitudes of the elements of the array.
Faster than getMagnitudeValues().
[out] | destination | The array where the magnitude squared values will be stored. |
Definition at line 40 of file ComplexFloatArray.cpp.
References ASSERT, SimpleArray< ComplexFloat >::data, SimpleArray< T >::getSize(), mag2(), and SimpleArray< ComplexFloat >::size.
Referenced by FourierPitchDetector::computeFrequency().
void ComplexFloatArray::getMagnitudeValues | ( | FloatArray | destination | ) |
The magnitudes of the elements of the array.
[out] | destination | The array where the magnitude values will be stored. |
Definition at line 16 of file ComplexFloatArray.cpp.
References SimpleArray< ComplexFloat >::data, mag(), and SimpleArray< ComplexFloat >::size.
int ComplexFloatArray::getMaxMagnitudeIndex | ( | ) |
The index of the element with the maximum magnitude in the array.
Definition at line 164 of file ComplexFloatArray.cpp.
References mag2(), and SimpleArray< ComplexFloat >::size.
float ComplexFloatArray::getMaxMagnitudeValue | ( | ) |
The value of the element with the maximum magnitude in the array.
Definition at line 182 of file ComplexFloatArray.cpp.
References mag(), mag2(), and SimpleArray< ComplexFloat >::size.
void ComplexFloatArray::getPhaseValues | ( | FloatArray | destination | ) |
The phases of the elements of the array.
[out] | destination | The array where the phase values will be stored. |
Definition at line 61 of file ComplexFloatArray.cpp.
References ASSERT, SimpleArray< ComplexFloat >::data, SimpleArray< T >::getSize(), and SimpleArray< ComplexFloat >::size.
void ComplexFloatArray::getPolar | ( | FloatArray | magnitude, |
FloatArray | phase | ||
) |
Get polar coordinates for all the elements in the array.
[out] | magnitude | An array containing the magnitudes. |
[out] | phase | An array containing the phases. |
Definition at line 52 of file ComplexFloatArray.cpp.
References ASSERT, SimpleArray< ComplexFloat >::data, ComplexFloat::getMagnitude(), ComplexFloat::getPhase(), SimpleArray< T >::getSize(), and SimpleArray< ComplexFloat >::size.
void ComplexFloatArray::getRealValues | ( | FloatArray | buf | ) |
Get the real part of the elements of the array.
[out] | buf | The array where the real part will be stored. |
Definition at line 194 of file ComplexFloatArray.cpp.
References SimpleArray< ComplexFloat >::data, ComplexFloat::re, and SimpleArray< ComplexFloat >::size.
|
inlineinherited |
Definition at line 31 of file SimpleArray.h.
|
inline |
Get the imaginary part of an element of the array.
i | The index of the element |
Definition at line 225 of file ComplexFloatArray.h.
References SimpleArray< ComplexFloat >::data, and ComplexFloat::im.
Referenced by add(), FastFourierTransform::fft(), QuadratureSineOscillator::generate(), FeedbackQuadratureSineOscillator::generate(), ComplexFeedbackQuadratureSineOscillator::generate(), mag2(), and subtract().
|
inlineinherited |
Copies the content of an array into a subset of the array.
Copies len elements from source to destinationOffset in the current array.
[in] | source | the source array |
[in] | destinationOffset | the offset into the destination array |
[in] | len | the number of samples to copy |
Definition at line 99 of file SimpleArray.h.
|
inlineinherited |
Copies the content of an array into a subset of the array.
Copies len elements starting from sourceOffset of source to destinationOffset in the current array.
[in] | source | the source array |
[in] | sourceOffset | the offset into the source array |
[in] | destinationOffset | the offset into the destination array |
[in] | len | the number of samples to copy |
Definition at line 111 of file SimpleArray.h.
|
inlineinherited |
Definition at line 35 of file SimpleArray.h.
float ComplexFloatArray::mag | ( | const int | i | ) |
Get the magnitude of an element of the array.
i | The index of the element |
Definition at line 5 of file ComplexFloatArray.cpp.
References SimpleArray< ComplexFloat >::data, and mag2().
Referenced by getMagnitudeValues(), and getMaxMagnitudeValue().
float ComplexFloatArray::mag2 | ( | const int | i | ) |
The magnitude squared of an element of the array.
Faster than mag().
i | The index of the element |
Definition at line 27 of file ComplexFloatArray.cpp.
References SimpleArray< ComplexFloat >::data, ComplexFloat::im, im(), ComplexFloat::re, and re().
Referenced by getMagnitudeSquaredValues(), getMaxMagnitudeIndex(), getMaxMagnitudeValue(), and mag().
|
inlineinherited |
Copies values within an array.
Copies length values starting from index fromIndex to locations starting with index toIndex
[in] | fromIndex | the first element to copy |
[in] | toIndex | the destination of the first element |
[in] | len | the number of elements to copy |
Definition at line 124 of file SimpleArray.h.
|
inlineinherited |
Casting operator to T*.
Definition at line 157 of file SimpleArray.h.
|
inline |
Get the real part of an element of the array.
i | The index of the element |
Definition at line 216 of file ComplexFloatArray.h.
References SimpleArray< ComplexFloat >::data, and ComplexFloat::re.
Referenced by add(), FastFourierTransform::fft(), QuadratureSineOscillator::generate(), FeedbackQuadratureSineOscillator::generate(), ComplexFeedbackQuadratureSineOscillator::generate(), FastFourierTransform::ifft(), mag2(), and subtract().
void ComplexFloatArray::scale | ( | float | factor | ) |
Array by scalar multiplication.
factor | The value by which all the elements of the array are multiplied. |
Definition at line 206 of file ComplexFloatArray.cpp.
References SimpleArray< ComplexFloat >::data, ComplexFloat::im, ComplexFloat::re, and SimpleArray< ComplexFloat >::size.
Referenced by ComplexFourierTransform::ifft().
void ComplexFloatArray::setAll | ( | ComplexFloat | value | ) |
Set all the elements in the array.
[in] | value | All the elements are set to this value. |
Definition at line 247 of file ComplexFloatArray.cpp.
References SimpleArray< ComplexFloat >::data, ComplexFloat::im, ComplexFloat::re, and SimpleArray< ComplexFloat >::size.
void ComplexFloatArray::setAll | ( | float | value | ) |
Set all the elements in the array.
[in] | value | The real and imaginary parts of all the elements in the array are set to this value. |
Definition at line 235 of file ComplexFloatArray.cpp.
References SimpleArray< ComplexFloat >::data, ComplexFloat::im, ComplexFloat::re, setAll(), and SimpleArray< ComplexFloat >::size.
void ComplexFloatArray::setAll | ( | float | valueRe, |
float | valueIm | ||
) |
Set all the elements in the array.
[in] | valueRe | The real part of every element of the the array will be set to this value. |
[in] | valueIm | The imaginary pary of rvery element of the the array will be set to this value. |
Definition at line 254 of file ComplexFloatArray.cpp.
References ComplexFloat::im, ComplexFloat::re, and setAll().
|
inlineinherited |
Set a single value in the array.
Definition at line 50 of file SimpleArray.h.
void ComplexFloatArray::setMagnitude | ( | FloatArray | magnitude | ) |
Set the magnitude of the elements of the array, leaving the phase unchanged.
[in] | magnitude | An array containing the magnitudes. |
Definition at line 287 of file ComplexFloatArray.cpp.
References SimpleArray< ComplexFloat >::size.
Referenced by setMagnitude().
void ComplexFloatArray::setMagnitude | ( | FloatArray | magnitude, |
ComplexFloatArray | destination | ||
) |
Set the magnitude of the elements of an array, using the phase from the current array.
[in] | magnitude | An array containing the magnitudes. |
[out] | destination | The destination array. |
Definition at line 293 of file ComplexFloatArray.cpp.
References setMagnitude(), and SimpleArray< ComplexFloat >::size.
void ComplexFloatArray::setMagnitude | ( | FloatArray | magnitude, |
int | offset, | ||
size_t | count | ||
) |
Set the magnitude of a range of elements of the array, leaving the phase unchanged.
[in] | magnitude | An array containing the magnitudes. |
[in] | offset | First element to set |
[in] | count | Number of elements to set |
Definition at line 290 of file ComplexFloatArray.cpp.
References setMagnitude().
void ComplexFloatArray::setMagnitude | ( | FloatArray | magnitude, |
int | offset, | ||
size_t | count, | ||
ComplexFloatArray | destination | ||
) |
Set the magnitude of a range of the elements of an array, using the phases from the current array.
The offset
and count
specified apply to both the source and destination
arrays. Elements of the destination
array outside this range will not be affected.
[in] | magnitude | An array containing the magnitudes. |
[in] | offset | First element to set |
[in] | count | Number of elements to set |
[out] | destination | The destination array. |
Definition at line 296 of file ComplexFloatArray.cpp.
References ASSERT, SimpleArray< ComplexFloat >::getData(), SimpleArray< T >::getData(), SimpleArray< T >::getSize(), SimpleArray< ComplexFloat >::getSize(), and ComplexFloat::setPolar().
void ComplexFloatArray::setPhase | ( | FloatArray | phase | ) |
Set the phase of the elements of the array, leaving the magnitude unchanged.
[in] | phase | An array containing the phases. |
Definition at line 270 of file ComplexFloatArray.cpp.
References SimpleArray< ComplexFloat >::size.
Referenced by setPhase().
void ComplexFloatArray::setPhase | ( | FloatArray | phase, |
ComplexFloatArray | destination | ||
) |
Set the phase of the elements of an array, using the magnitude from the current array.
[in] | phase | An array containing the phases. |
[out] | destination | The destination array. |
Definition at line 278 of file ComplexFloatArray.cpp.
References setPhase(), and SimpleArray< ComplexFloat >::size.
void ComplexFloatArray::setPhase | ( | FloatArray | phase, |
int | offset, | ||
size_t | count | ||
) |
Set the phase of a range of elements of the array, leaving the magnitude unchanged.
[in] | phase | An array containing the phases. |
[in] | offset | First element to set |
[in] | count | Number of elements to set |
Definition at line 273 of file ComplexFloatArray.cpp.
References SimpleArray< ComplexFloat >::data, and ComplexFloat::setPhase().
void ComplexFloatArray::setPhase | ( | FloatArray | phase, |
int | offset, | ||
size_t | count, | ||
ComplexFloatArray | destination | ||
) |
Set the phase of a range of the elements of an array, using the magnitude from the current array.
The offset
and count
specified apply to both the source and destination
arrays. Elements of the destination
array outside this range will not be affected.
[in] | phase | An array containing the phases. |
[in] | offset | First element to set |
[in] | count | Number of elements to set |
[out] | destination | The destination array. |
Definition at line 281 of file ComplexFloatArray.cpp.
References ASSERT, SimpleArray< ComplexFloat >::getData(), SimpleArray< T >::getData(), SimpleArray< T >::getSize(), and ComplexFloat::setPolar().
void ComplexFloatArray::setPolar | ( | FloatArray | magnitude, |
FloatArray | phase | ||
) |
Set all the elements in the array using polar coordinates.
[in] | magnitude | An array containing the magnitudes. |
[in] | phase | An array containing the phases. |
Definition at line 261 of file ComplexFloatArray.cpp.
References SimpleArray< ComplexFloat >::size.
void ComplexFloatArray::setPolar | ( | FloatArray | magnitude, |
FloatArray | phase, | ||
int | offset, | ||
size_t | count | ||
) |
Set a range of elements in the array using polar coordinates.
[in] | magnitude | An array containing the magnitudes. |
[in] | phase | An array containing the phases. |
[in] | offset | First element to set |
[in] | count | Number of elements to set |
Definition at line 264 of file ComplexFloatArray.cpp.
References SimpleArray< ComplexFloat >::data, and ComplexFloat::setPolar().
ComplexFloatArray ComplexFloatArray::subArray | ( | int | offset, |
size_t | length | ||
) |
A subset of the array.
Returns an array that points to subset of the memory used by the original array.
[in] | offset | the first element of the subset. |
[in] | length | the number of elments in the new ComplexFloatArray. |
Definition at line 177 of file ComplexFloatArray.cpp.
References ASSERT, ComplexFloatArray(), SimpleArray< ComplexFloat >::data, and SimpleArray< ComplexFloat >::size.
Referenced by FourierPitchDetector::computeFrequency().
void ComplexFloatArray::subtract | ( | ComplexFloatArray | operand2 | ) |
In-place element-wise difference between complex arrays.
Sutracts each element of operand2 from the corresponding element in the array.
operand2 | second operand for the sum |
Definition at line 129 of file ComplexFloatArray.cpp.
References subtract().
void ComplexFloatArray::subtract | ( | ComplexFloatArray | operand2, |
ComplexFloatArray | destination | ||
) |
Element-wise difference between complex arrays.
Sets each element in destination to the complex difference between the corresponding element of the array and operand2
[in] | operand2 | second operand for the subtraction |
[out] | destination | the destination array |
Definition at line 117 of file ComplexFloatArray.cpp.
References ASSERT, SimpleArray< T >::data, SimpleArray< ComplexFloat >::data, SimpleArray< T >::getData(), ComplexFloat::im, im(), ComplexFloat::re, re(), SimpleArray< ComplexFloat >::size, and SimpleArray< T >::size.
Referenced by subtract().
void ComplexFloatArray::toFloat | ( | FloatArray | destination | ) |
Copies real and imaginary values of the ComplexFloatArray into a FloatArray.
[out] | destination | The destination array |
Definition at line 227 of file ComplexFloatArray.cpp.
References ASSERT, SimpleArray< ComplexFloat >::data, SimpleArray< T >::getSize(), ComplexFloat::re, and SimpleArray< ComplexFloat >::size.
|
protectedinherited |
Definition at line 16 of file SimpleArray.h.
|
protectedinherited |
Definition at line 17 of file SimpleArray.h.