|
| CFix (double r=0.0, double i=0.0, int s=0, int w=MAX_WORDLEN, e_mode e=TC, o_mode o=WRAP, q_mode q=TRN, Stat *ptr=0) |
| Default constructor.
|
|
| CFix (std::complex< double > x, double, int s=0, int w=MAX_WORDLEN, e_mode e=TC, o_mode o=WRAP, q_mode q=TRN, Stat *ptr=0) |
| Constructor.
|
|
| CFix (const Fix_Factory &f) |
| Constructor.
|
|
| CFix (fixrep r, fixrep i, int s, int, int) |
| Constructor for internal use. No restrictions are applied. The dummies help to avoid ambiguities.
|
|
| CFix (const Fix &r, const Fix &i=0.0, int w=MAX_WORDLEN, e_mode e=TC, o_mode o=WRAP, q_mode q=TRN, Stat *ptr=0) |
| Constructor.
|
|
| CFix (const CFix &x, double, int w=MAX_WORDLEN, e_mode e=TC, o_mode o=WRAP, q_mode q=TRN, Stat *ptr=0) |
| Copy constructor.
|
|
virtual | ~CFix () |
| Destructor.
|
|
CFix & | operator= (const CFix &x) |
| Assignment from CFix.
|
|
CFix & | operator= (const Fix &x) |
| Assignment from Fix.
|
|
CFix & | operator= (const std::complex< double > &x) |
| Assignment from std::complex<double>. Fractional part is truncated.
|
|
CFix & | operator= (const int x) |
| Assignment from int.
|
|
CFix & | operator+= (const CFix &x) |
| Addition of CFix.
|
|
CFix & | operator+= (const Fix &x) |
| Addition of Fix.
|
|
CFix & | operator+= (const int x) |
| Addition of int.
|
|
CFix & | operator-= (const CFix &x) |
| Subtraction of CFix.
|
|
CFix & | operator-= (const Fix &x) |
| Subtraction of Fix.
|
|
CFix & | operator-= (const int x) |
| Subtraction of int.
|
|
CFix & | operator*= (const CFix &x) |
| Multiplication with CFix. Temporary variables use the maximum word length (64 bits)
|
|
CFix & | operator*= (const Fix &x) |
| Multiplication with Fix. Temporary variables use the maximum word length (64 bits)
|
|
CFix & | operator*= (const int x) |
| Multiplication with int. Temporary variables use the maximum word length (64 bits)
|
|
CFix & | operator/= (const CFix &x) |
| Division with CFix using quantization mode TRN . Temporary variables use the maximum word length (64 bits)
|
|
CFix & | operator/= (const Fix &x) |
| Division with Fix using quantization mode TRN . Temporary variables use the maximum word length (64 bits)
|
|
CFix & | operator/= (const int x) |
| Division with int using quantization mode TRN . Temporary variables use the maximum word length (64 bits)
|
|
CFix | operator- () const |
| Unary negative of CFix.
|
|
CFix & | operator<<= (const int n) |
| Left shift n bits.
|
|
CFix & | operator>>= (const int n) |
| Right shift n bits using quantization mode qmode (constructor argument)
|
|
void | set (double real, double imag, int n) |
| Set to (real + i*imag) * pow2(n) using quantization mode qmode (constructor argument)
|
|
void | set (double real, double imag, int n, q_mode q) |
| Set to (real + i*imag) * pow2(n) using quantization mode q (function argument)
|
|
void | set (const std::complex< double > &x, int n) |
| Set to x * pow2(n) using quantization mode qmode (constructor argument)
|
|
void | set (const std::complex< double > &x, int n, q_mode q) |
| Set to x * pow2(n) using quantization mode q (function argument)
|
|
void | set_re (fixrep x) |
| Set data representation for real part (mainly for internal use since it reveals the representation type)
|
|
void | set_im (fixrep x) |
| Set data representation for imaginary part (mainly for internal use since it reveals the representation type)
|
|
void | lshift (int n) |
| Left shift n bits.
|
|
void | rshift (int n) |
| Right shift n bits using quantization mode qmode (constructor argument)
|
|
void | rshift (int n, q_mode q) |
| Right shift n bits using quantization mode q (function argument)
|
|
virtual void | print () const |
| Print restrictions.
|
|
fixrep | get_re () const |
| Get data representation for real part (mainly for internal use since it reveals the representation type)
|
|
fixrep | get_im () const |
| Get data representation for imaginary part (mainly for internal use since it reveals the representation type)
|
|
std::complex< double > | unfix () const |
| Conversion to std::complex<double>
|
|
| operator std::complex< double > () const |
| Conversion to std::complex<double>
|
|
void | set_shift (int s) |
| Set shift (without shifting)
|
|
int | get_shift () const |
| Get shift.
|
|
int | get_wordlen () const |
| Get word length.
|
|
e_mode | get_e_mode () const |
| Get sign encoding mode.
|
|
o_mode | get_o_mode () const |
| Get overflow mode.
|
|
q_mode | get_q_mode () const |
| Get quantization mode.
|
|
output_mode | get_output_mode () const |
| Get output mode.
|
|
fixrep | get_max () const |
| Get maximum value of data representation.
|
|
fixrep | get_min () const |
| Get minimum value of data representation.
|
|
Complex fixed-point data type.
See the Detailed Description in the Fixed-point Module module.
Definition at line 51 of file cfix.h.