SPUC  3.0
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
SPUC::cordic< Numeric > Class Template Reference

Cordic rotator. More...

#include <cordic.h>

Public Member Functions

 cordic (int n=7)
 initializes tables and constants for the CORDIC algorithm More...
 
Numeric vector_mag (complex< Numeric > in)
 Returns magnitude through CORDIC vectoring. More...
 
float_type vector_arg (complex< Numeric > in)
 Returns arg through CORDIC vectoring. More...
 
complex< Numeric > rotate (complex< Numeric > in, float_type angle)
 

Public Attributes

std::vector< float_typearctan_lut
 
std::vector< complex< Numeric > > stage
 
long stages
 
float_type vector_angle
 

Protected Member Functions

Numeric cordic_vector (complex< Numeric > in)
 Cordic vectoring calculates arg and magnitude. More...
 

Detailed Description

template<class Numeric>
class SPUC::cordic< Numeric >

Cordic rotator.

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

Author
Tony Kirke
cordic.png
cordic.gif

Constructor & Destructor Documentation

template<class Numeric>
SPUC::cordic< Numeric >::cordic ( int  n = 7)
inline

initializes tables and constants for the CORDIC algorithm

Member Function Documentation

template<class Numeric>
Numeric SPUC::cordic< Numeric >::cordic_vector ( complex< Numeric >  in)
inlineprotected

Cordic vectoring calculates arg and magnitude.

Referenced by SPUC::cordic< CNumeric >::vector_arg(), and SPUC::cordic< CNumeric >::vector_mag().

template<class Numeric>
complex<Numeric> SPUC::cordic< Numeric >::rotate ( complex< Numeric >  in,
float_type  angle 
)
inline
template<class Numeric>
float_type SPUC::cordic< Numeric >::vector_arg ( complex< Numeric >  in)
inline

Returns arg through CORDIC vectoring.

template<class Numeric>
Numeric SPUC::cordic< Numeric >::vector_mag ( complex< Numeric >  in)
inline

Returns magnitude through CORDIC vectoring.

Member Data Documentation

template<class Numeric>
std::vector<float_type> SPUC::cordic< Numeric >::arctan_lut
template<class Numeric>
std::vector<complex<Numeric> > SPUC::cordic< Numeric >::stage
template<class Numeric>
long SPUC::cordic< Numeric >::stages
template<class Numeric>
float_type SPUC::cordic< Numeric >::vector_angle

The documentation for this class was generated from the following file: