#include <cordic.h>
Public Member Functions | |
| cordic (int n=7) | |
| initializes tables and constants for the CORDIC algorithm | |
| Numeric | vector_mag (complex< Numeric > in) |
| Returns magnitude through CORDIC vectoring. | |
| float_type | vector_arg (complex< Numeric > in) |
| Returns arg through CORDIC vectoring. | |
| complex< Numeric > | rotate (complex< Numeric > in, float_type angle) |
Public Attributes | |
| smart_array< float_type > | arctan_lut |
| smart_array< complex< Numeric > > | stage |
| long | stages |
| float_type | vector_angle |
Protected Member Functions | |
| Numeric | cordic_vector (complex< Numeric > in) |
| Cordic vectoring calculates arg and magnitude. | |
Performs CORDIC rotations To rotate a vector through an angle of theta, we calculate:
x' = x cos(theta) - y sin(theta) y' = x sin(theta) + y cos(theta) Can be easily modified for hyperbolic and other functions
| SPUC::cordic< Numeric >::cordic | ( | int | n = 7 |
) | [inline] |
initializes tables and constants for the CORDIC algorithm
| Numeric SPUC::cordic< Numeric >::cordic_vector | ( | complex< Numeric > | in | ) | [inline, protected] |
Cordic vectoring calculates arg and magnitude.
| complex<Numeric> SPUC::cordic< Numeric >::rotate | ( | complex< Numeric > | in, | |
| float_type | angle | |||
| ) | [inline] |
| float_type SPUC::cordic< Numeric >::vector_arg | ( | complex< Numeric > | in | ) | [inline] |
Returns arg through CORDIC vectoring.
| Numeric SPUC::cordic< Numeric >::vector_mag | ( | complex< Numeric > | in | ) | [inline] |
Returns magnitude through CORDIC vectoring.
| smart_array<float_type> SPUC::cordic< Numeric >::arctan_lut |
| smart_array<complex<Numeric> > SPUC::cordic< Numeric >::stage |
| long SPUC::cordic< Numeric >::stages |
| float_type SPUC::cordic< Numeric >::vector_angle |
1.4.7