OpenWareLaboratory
|
A structure defining a floating point complex number as two members of type float. More...
Public Member Functions | |
constexpr | ComplexFloat () |
constexpr | ComplexFloat (float re, float im) |
constexpr | ComplexFloat (float x) |
ComplexFloat | getComplexConjugate () const |
Returns complex conjugate - a copy of current number with imaginary part inverted. More... | |
ComplexFloat | getDotProduct (ComplexFloat other) const |
Returns dot product with another complex float value. More... | |
float | getMagnitude () const |
Get the magnitude of the complex number. More... | |
float | getMagnitudeSquared () const |
Get the squared magnitude of the complex number. More... | |
float | getPhase () const |
Get the phase of the complex number. More... | |
bool | operator!= (const ComplexFloat &other) const |
ComplexFloat & | operator*= (const ComplexFloat &other) |
ComplexFloat & | operator*= (float other) |
ComplexFloat & | operator+= (const ComplexFloat &other) |
ComplexFloat & | operator+= (float other) |
ComplexFloat & | operator-= (const ComplexFloat &other) |
ComplexFloat & | operator-= (float other) |
ComplexFloat & | operator/= (float other) |
bool | operator< (const ComplexFloat &other) const |
bool | operator<= (const ComplexFloat &other) const |
bool | operator== (const ComplexFloat &other) const |
bool | operator> (const ComplexFloat &other) const |
bool | operator>= (const ComplexFloat &other) const |
void | setMagnitude (float magnitude) |
Set the magnitude of the complex number. More... | |
void | setPhase (float phase) |
Set the phase of the complex number. More... | |
void | setPolar (float magnitude, float phase) |
Set magnitude and phase of the complex number. More... | |
Data Fields | |
float | im |
The imaginary part of the complex number. More... | |
float | re |
The real part of the complex number. More... | |
Friends | |
const ComplexFloat | operator* (const ComplexFloat &lhs, const ComplexFloat &rhs) |
const ComplexFloat | operator* (const ComplexFloat &lhs, float rhs) |
const ComplexFloat | operator+ (const ComplexFloat &lhs, const ComplexFloat &rhs) |
const ComplexFloat | operator+ (const ComplexFloat &lhs, float rhs) |
const ComplexFloat | operator- (const ComplexFloat &lhs, const ComplexFloat &rhs) |
const ComplexFloat | operator- (const ComplexFloat &lhs, float rhs) |
const ComplexFloat | operator/ (const ComplexFloat &lhs, float rhs) |
A structure defining a floating point complex number as two members of type float.
Definition at line 10 of file ComplexFloatArray.h.
|
inlineconstexpr |
Definition at line 11 of file ComplexFloatArray.h.
|
inlineconstexpr |
Definition at line 12 of file ComplexFloatArray.h.
|
inlineconstexpr |
Definition at line 13 of file ComplexFloatArray.h.
|
inline |
Returns complex conjugate - a copy of current number with imaginary part inverted.
Definition at line 86 of file ComplexFloatArray.h.
|
inline |
Returns dot product with another complex float value.
Definition at line 93 of file ComplexFloatArray.h.
|
inline |
Get the magnitude of the complex number.
Computes and returns the magnitude of the complex number.
Definition at line 30 of file ComplexFloatArray.h.
Referenced by ComplexFloatArray::getPolar(), and setPhase().
|
inline |
Get the squared magnitude of the complex number.
Computes and returns the squaredmagnitude of the complex number, which is cheaper to compute than the magnitude itself.
Definition at line 40 of file ComplexFloatArray.h.
Referenced by operator<(), operator<=(), operator>(), and operator>=().
|
inline |
Get the phase of the complex number.
Computes and returns the phase of the complex number.
Definition at line 49 of file ComplexFloatArray.h.
Referenced by ComplexFloatArray::getPolar(), and setMagnitude().
|
inline |
Definition at line 117 of file ComplexFloatArray.h.
|
inline |
Definition at line 185 of file ComplexFloatArray.h.
|
inline |
Definition at line 179 of file ComplexFloatArray.h.
|
inline |
Definition at line 138 of file ComplexFloatArray.h.
|
inline |
Definition at line 133 of file ComplexFloatArray.h.
References re.
|
inline |
Definition at line 161 of file ComplexFloatArray.h.
|
inline |
Definition at line 156 of file ComplexFloatArray.h.
References re.
|
inline |
Definition at line 197 of file ComplexFloatArray.h.
|
inline |
Definition at line 97 of file ComplexFloatArray.h.
References getMagnitudeSquared().
|
inline |
Definition at line 105 of file ComplexFloatArray.h.
References getMagnitudeSquared().
|
inline |
Definition at line 113 of file ComplexFloatArray.h.
|
inline |
Definition at line 101 of file ComplexFloatArray.h.
References getMagnitudeSquared().
|
inline |
Definition at line 109 of file ComplexFloatArray.h.
References getMagnitudeSquared().
|
inline |
Set the magnitude of the complex number.
Set the magnitude of the complex number, keeping the phase unaltered.
magnitude | The new magnitude of the complex number |
Definition at line 68 of file ComplexFloatArray.h.
References getPhase(), and setPolar().
|
inline |
Set the phase of the complex number.
Set the phase of the complex number, keeping the magnitude unaltered.
phase | The new phase of the complex number |
Definition at line 58 of file ComplexFloatArray.h.
References getMagnitude(), and setPolar().
Referenced by ComplexFloatArray::setPhase().
|
inline |
Set magnitude and phase of the complex number.
magnitude | The new magnitude of the complex number |
phase | The new phase of the complex number |
Definition at line 78 of file ComplexFloatArray.h.
Referenced by setMagnitude(), ComplexFloatArray::setMagnitude(), setPhase(), ComplexFloatArray::setPhase(), and ComplexFloatArray::setPolar().
|
friend |
Definition at line 167 of file ComplexFloatArray.h.
|
friend |
Definition at line 173 of file ComplexFloatArray.h.
|
friend |
Definition at line 121 of file ComplexFloatArray.h.
|
friend |
Definition at line 127 of file ComplexFloatArray.h.
|
friend |
Definition at line 144 of file ComplexFloatArray.h.
|
friend |
Definition at line 150 of file ComplexFloatArray.h.
|
friend |
Definition at line 191 of file ComplexFloatArray.h.
float ComplexFloat::im |
The imaginary part of the complex number.
Definition at line 23 of file ComplexFloatArray.h.
Referenced by ComplexFloatArray::add(), ComplexFloatArray::complexDotProduct(), ComplexFloatArray::copyTo(), ComplexFloatArray::fromFloat(), FeedbackQuadratureSineOscillator::generate(), ComplexFeedbackQuadratureSineOscillator::generate(), getComplexConjugate(), getDotProduct(), ComplexFloatArray::getImaginaryValues(), getMagnitude(), getMagnitudeSquared(), getPhase(), FeedbackQuadratureSineOscillator::getSample(), ComplexFeedbackQuadratureSineOscillator::getSample(), ComplexFloatArray::im(), ComplexFloatArray::mag2(), operator!=(), operator*=(), operator+=(), operator-=(), operator/=(), operator==(), TransformationMatrix< matrix_order, Operation >::process(), Rotation2D< matrix_order >::rotate(), Scale2D< matrix_order >::scale(), ComplexFloatArray::scale(), ComplexFloatArray::setAll(), setPolar(), Stretch2D< matrix_order >::stretch(), ComplexFloatArray::subtract(), and Translation2D< matrix_order >::translate().
float ComplexFloat::re |
The real part of the complex number.
Definition at line 18 of file ComplexFloatArray.h.
Referenced by ComplexFloatArray::add(), ComplexFloatArray::complexDotProduct(), ComplexFloatArray::copyTo(), ComplexFloatArray::fromFloat(), FeedbackQuadratureSineOscillator::generate(), ComplexFeedbackQuadratureSineOscillator::generate(), getComplexConjugate(), getDotProduct(), getMagnitude(), getMagnitudeSquared(), getPhase(), ComplexFloatArray::getRealValues(), FeedbackQuadratureSineOscillator::getSample(), ComplexFeedbackQuadratureSineOscillator::getSample(), ComplexFloatArray::mag2(), operator!=(), operator*=(), operator+=(), operator-=(), operator/=(), operator==(), TransformationMatrix< matrix_order, Operation >::process(), ComplexFloatArray::re(), Rotation2D< matrix_order >::rotate(), Scale2D< matrix_order >::scale(), ComplexFloatArray::scale(), ComplexFloatArray::setAll(), setPolar(), Stretch2D< matrix_order >::stretch(), ComplexFloatArray::subtract(), ComplexFloatArray::toFloat(), and Translation2D< matrix_order >::translate().