|
Yate
|
A Complex (float) number. More...
#include <yatemath.h>
Public Member Functions | |
| Complex () | |
| Complex (float real, float imag=0) | |
| Complex (const Complex &c) | |
| float | re () const |
| void | re (float r) |
| float | im () const |
| void | im (float i) |
| Complex & | set (float r=0, float i=0) |
| bool | operator== (const Complex &c) const |
| bool | operator!= (const Complex &c) const |
| Complex & | operator= (const Complex &c) |
| Complex & | operator= (float real) |
| Complex & | operator+= (const Complex &c) |
| Complex & | operator+= (float real) |
| Complex & | operator-= (const Complex &c) |
| Complex & | operator-= (float real) |
| Complex & | operator*= (const Complex &c) |
| Complex & | operator*= (float f) |
| Complex & | operator/= (const Complex &c) |
| Complex & | operator/= (float f) |
| float | abs () const |
| float | mod () const |
| float | arg () const |
| Complex | exp () const |
| float | norm () const |
| float | norm2 () const |
A Complex (float) number.
This class implements a complex number
|
inline |
Constructor
Referenced by Complex::exp().
|
inline |
Constructor
| real | The real part of the complex number |
| imag | The imaginary part of a complex number |
|
inline |
Compute the absolute value of this complex number
References Complex::norm2().
Referenced by Complex::mod(), and Complex::norm().
|
inline |
Compute the the argument of this complex number
|
inline |
|
inline |
Obtain the imaginary part of a complex number
|
inline |
Set the imaginary part of the complex number
| i | The new imaginary part value |
|
inline |
|
inline |
|
inline |
Compute the norm2 value of this complex number
Referenced by Complex::abs(), and Complex::operator/=().
|
inline |
Inequality operator
| c | Complex number to compare with |
Multiplication operator
| c | Complex number to multiply with |
References Complex::set().
|
inline |
Multiplication operator. Multiply this number with a float number
| f | Value to multiply with |
References Complex::set().
Addition operator
| c | Complex number to add |
References Complex::set().
|
inline |
Addition operator. Add a value to the real part
| real | Value to add to real part |
Substraction operator
| c | Complex number to substract from this one |
References Complex::set().
|
inline |
Substraction operator. Substract a value a value from the real part
| real | Value to substract from real part |
Division operator
| c | Complex number to devide with |
References Complex::norm2(), and Complex::set().
|
inline |
Division operator
| f | Float number to devide with |
References Complex::set().
Assignment operator
| c | Complex number to assign |
References Complex::set().
|
inline |
Assignment operator. Set the real part, reset the imaginary one
| real | New real part value |
References Complex::set().
|
inline |
|
inline |
Obtain the real part of the complex number
|
inline |
Set the real part of the complex number
| r | The new real part value |
|
inline |
Set data
| r | The real part of the complex number |
| i | The imaginary part of a complex number |
Referenced by Complex::operator*=(), Complex::operator*=(), Complex::operator+=(), Complex::operator-=(), Complex::operator/=(), Complex::operator/=(), Complex::operator=(), and Complex::operator=().