SPUC
3.0
|
![]() |
Classes | |
class | SPUC::a_d |
An A/D conversion class. More... | |
class | SPUC::circ_buffer< T > |
Circular Buffer. More... | |
class | SPUC::cordic< Numeric > |
Cordic rotator. More... | |
class | SPUC::delay< Numeric > |
Template class for Delay line. More... | |
class | SPUC::fixed_delay< Numeric, D > |
Template class for Delay line with Fixed Delay. More... | |
class | SPUC::max_pn |
Maximal Length Pseudorandom sequence generator. More... | |
class | SPUC::noise |
Gaussian noise routine. More... | |
class | SPUC::qnoise< Numeric > |
class to add quantization noise to signal More... | |
class | SPUC::quantiser< Numeric > |
........ More... | |
class | SPUC::rv_stat |
a basic random Variable Statistics Class More... | |
class | SPUC::sigma_delta |
Simple 1st order All-digital Sigma Delta converter. More... | |
Typedefs | |
typedef complex< float_type > | SPUC::CPLX |
General Purpose C++ complex FFT Transform. More... | |
Functions | |
template<class T > | |
std::vector< T > | SPUC::auto_corr (const std::vector< T > &x) |
Compute the autocorrelation of the Vector. More... | |
template<class T > | |
std::vector< T > | SPUC::burg (std::vector< T > x, int P) |
AR model coefficients calculation using Burg algorithm. More... | |
template<typename T > | |
T | SPUC::conj (T in) |
Templated conjugate function template function that uses a class to allow template specialization. More... | |
template<class T > | |
std::vector< T > | SPUC::convolve (const std::vector< T > &x, const std::vector< T > &y) |
std::vector< complex < float_type > > | SPUC::find_roots (const std::vector< float_type > &a, long n) |
Calculate the complex roots of a polynomial equation. More... | |
template<class T > | |
std::vector< T > | SPUC::fliplr (const std::vector< T > &x) |
fliplr - same as matlab function More... | |
template<class T > | |
complex< float_type > | SPUC::freqz_point (std::vector< T > b, std::vector< T > a, float_type freq, int N) |
frequency transfer function at freq with iir A and B equations More... | |
template<class T > | |
float_type | SPUC::freqz_mag_point (std::vector< T > x, float_type freq, int N) |
frequency magnitude function at freq with fir x More... | |
template<class T > | |
complex< float_type > | SPUC::freqz_point (T a, float_type freq) |
frequency transfer function at freq for 1st order allpass More... | |
template<class T > | |
std::vector< complex < float_type > > | SPUC::freqz (std::vector< T > b, std::vector< T > a, int pts) |
frequency transfer function over "pts" points for IIR More... | |
template<class T > | |
std::vector< complex < float_type > > | SPUC::freqz_mag (std::vector< T > b, std::vector< T > a, int pts) |
frequency magnitude function over "pts" points for IIR More... | |
template<class T > | |
std::vector< complex < float_type > > | SPUC::freqz_fir (std::vector< T > x, int pts) |
frequency magnitude function over "pts" points for FIR More... | |
template<class T > | |
std::vector< T > | SPUC::levdur (std::vector< T > R) |
Template class for Levinson-Durbin algorithm. More... | |
template<typename T > | |
base_type< T >::btype | SPUC::magsq (T in) |
Templated Magnitude Squared function template function that uses a class to allow template specialization. More... | |
template<class T > | |
std::vector< T > | SPUC::partial_convolve (const std::vector< T > &x, const std::vector< T > &y, int N, int M) |
template<class T > | |
complex< float_type > | SPUC::ptr_freqz_point (T *b, T *a, float_type freq, int N) |
frequency transfer function at freq with iir A and B equations More... | |
template<class T > | |
float_type | SPUC::ptr_freqz_mag_point (T *x, float_type freq, int N) |
frequency magnitude function at freq with fir x More... | |
template<class T > | |
complex< float_type > | SPUC::ptr_freqz_point (T a, float_type freq) |
frequency transfer function at freq for 1st order allpass More... | |
template<class T > | |
void | SPUC::freqz (complex< float_type > *f, T *b, T *a, int N, int pts) |
frequency transfer function over "pts" points for IIR More... | |
template<class T > | |
void | SPUC::ptr_freqz_mag (float_type *f, T *b, T *a, int N, int pts) |
frequency magnitude function over "pts" points for IIR More... | |
template<class T > | |
void | SPUC::ptr_freqz_fir (complex< float_type > *f, T *x, int N, int pts) |
frequency magnitude function over "pts" points for FIR More... | |
template<typename T > | |
quantized_type< T >::dtype | SPUC::quantize (T in) |
Templated Quantize function template function that uses a class to allow template specialization. More... | |
template<class T > | |
long | SPUC::real_quantize (T in) |
Templated quantize function. More... | |
template<class T > | |
T | SPUC::real_round (T in, long bits) |
Templated round function. More... | |
template<class T > | |
T | SPUC::real_saturate (T in, long bits) |
Templated saturation functions. More... | |
template<> | |
long | SPUC::real_saturate (long in, long bits) |
Templated saturation functions. More... | |
template<class T > | |
T | SPUC::round (T in, long bits) |
Templated round function template function that uses a class to allow template specialization. More... | |
template<class T > | |
T | SPUC::saturate (T in, long bits) |
Templated saturate function template function that uses a class to allow template specialization. More... | |
template<typename T > | |
T | SPUC::signbit (T in) |
Templated signbit function template function that uses a class to allow template specialization. More... | |
template<class T > | |
void | SPUC::toeplitz (vector< T > x, matrix< T > &A) |
Get Symmetric Toeplitz matrix from vector. More... | |
SPUC::cfft::cfft (int size, float_type scalef1=0.5, float_type scalef2=1.0, float_type scalei1=1.0, float_type scalei2=1.0) | |
General Purpose C++ complex FFT Transform. More... | |
typedef complex<float_type> SPUC::CPLX |
General Purpose C++ complex FFT Transform.
This is a general-purpose C++ complex FFT transform class. it is defined as a template over a complex type. For instance, if using gnu gcc, the complex type is complex<float_type> And you declare the cfft class as cfft<complex<float_type>>
The underlying CPLX type requires: CPLX() operator = , CPLX(CPLX const&) CPLX(float_type,float_type) [used on cos/sin] CPLX operator*( CPLX , float_type ) CPLX conj(CPLX const &); [conjugate] ComPlex::operator @ (CPLX , CPLX ) [ where @ =* + - ]
std::vector<T> SPUC::auto_corr | ( | const std::vector< T > & | x | ) |
Compute the autocorrelation of the Vector.
Referenced by main().
std::vector<T> SPUC::burg | ( | std::vector< T > | x, |
int | P | ||
) |
AR model coefficients calculation using Burg algorithm.
References SPUC::conj(), and SPUC::magsq().
SPUC::cfft::cfft | ( | int | size, |
float_type | scalef1 = 0.5 , |
||
float_type | scalef2 = 1.0 , |
||
float_type | scalei1 = 1.0 , |
||
float_type | scalei2 = 1.0 |
||
) |
General Purpose C++ complex FFT Transform.
References SPUC::conj(), SPUC::cos(), and PI.
T SPUC::conj | ( | T | in | ) |
Templated conjugate function template function that uses a class to allow template specialization.
Referenced by SPUC::rls< Numeric >::adapt(), SPUC::burg(), SPUC::cfft::cfft(), SPUC::dd_symbol(), SPUC::cfft::hermitian(), SPUC::qpsk_dd_phase(), SPUC::fir_adapt< Numeric, Numeric >::update_lms(), and SPUC::fir_adapt< Numeric, Numeric >::update_lms_sign_coeff().
std::vector<T> SPUC::convolve | ( | const std::vector< T > & | x, |
const std::vector< T > & | y | ||
) |
References M.
Referenced by SPUC::iir_coeff::pz_to_ap().
std::vector< complex< float_type > > SPUC::find_roots | ( | const std::vector< float_type > & | a, |
long | n | ||
) |
Calculate the complex roots of a polynomial equation.
References SPUC::exp(), and SPUC::sqrt().
Referenced by main(), and SPUC::iir_coeff::pz_to_ap().
std::vector<T> SPUC::fliplr | ( | const std::vector< T > & | x | ) |
fliplr - same as matlab function
Referenced by SPUC::iir_coeff::pz_to_ap().
void SPUC::freqz | ( | complex< float_type > * | f, |
T * | b, | ||
T * | a, | ||
int | N, | ||
int | pts | ||
) |
frequency transfer function over "pts" points for IIR
References SPUC::cos(), and PI.
std::vector<complex<float_type> > SPUC::freqz | ( | std::vector< T > | b, |
std::vector< T > | a, | ||
int | pts | ||
) |
frequency transfer function over "pts" points for IIR
References SPUC::cos(), and PI.
std::vector<complex<float_type> > SPUC::freqz_fir | ( | std::vector< T > | x, |
int | pts | ||
) |
frequency magnitude function over "pts" points for FIR
References SPUC::cos(), and PI.
std::vector<complex<float_type> > SPUC::freqz_mag | ( | std::vector< T > | b, |
std::vector< T > | a, | ||
int | pts | ||
) |
frequency magnitude function over "pts" points for IIR
References SPUC::cos(), SPUC::magsq(), and PI.
float_type SPUC::freqz_mag_point | ( | std::vector< T > | x, |
float_type | freq, | ||
int | N | ||
) |
frequency magnitude function at freq with fir x
References SPUC::expj(), and SPUC::hypot().
complex<float_type> SPUC::freqz_point | ( | std::vector< T > | b, |
std::vector< T > | a, | ||
float_type | freq, | ||
int | N | ||
) |
frequency transfer function at freq with iir A and B equations
References SPUC::cos().
complex<float_type> SPUC::freqz_point | ( | T | a, |
float_type | freq | ||
) |
frequency transfer function at freq for 1st order allpass
References SPUC::cos(), and SPUC::normalized().
std::vector<T> SPUC::levdur | ( | std::vector< T > | R | ) |
Template class for Levinson-Durbin algorithm.
<font color="red">Under construction!</font>
base_type< T >::btype SPUC::magsq | ( | T | in | ) |
Templated Magnitude Squared function template function that uses a class to allow template specialization.
References SPUC::magsqr< T >::magsqd().
Referenced by SPUC::burg(), SPUC::cic_freq(), SPUC::mle< Numeric >::estimate(), SPUC::fir_freq(), SPUC::iir_coeff::freqz_mag(), SPUC::fir_coeff< Numeric >::freqz_mag(), SPUC::freqz_mag(), SPUC::hypot(), main(), SPUC::other_freq(), SPUC::ptr_freqz_mag(), SPUC::iir_coeff::pz_to_ap(), SPUC::iir_coeff::pz_to_poly(), SPUC::sqrt(), SPUC::qpsk_discriminators::symbol_lock_out(), SPUC::sim_qpsk_variable< Numeric >::tx_step(), SPUC::equalizer::update_levels(), SPUC::fast_equalizer::update_levels(), SPUC::z_freqz_db(), and SPUC::iir_coeff::z_root_to_ab().
std::vector<T> SPUC::partial_convolve | ( | const std::vector< T > & | x, |
const std::vector< T > & | y, | ||
int | N, | ||
int | M | ||
) |
References M.
Referenced by SPUC::iir_coeff::p2_to_poly(), and SPUC::iir_coeff::pz_to_poly().
void SPUC::ptr_freqz_fir | ( | complex< float_type > * | f, |
T * | x, | ||
int | N, | ||
int | pts | ||
) |
frequency magnitude function over "pts" points for FIR
References SPUC::cos(), and PI.
void SPUC::ptr_freqz_mag | ( | float_type * | f, |
T * | b, | ||
T * | a, | ||
int | N, | ||
int | pts | ||
) |
frequency magnitude function over "pts" points for IIR
References SPUC::cos(), SPUC::magsq(), and PI.
float_type SPUC::ptr_freqz_mag_point | ( | T * | x, |
float_type | freq, | ||
int | N | ||
) |
frequency magnitude function at freq with fir x
References SPUC::expj(), and SPUC::hypot().
complex<float_type> SPUC::ptr_freqz_point | ( | T * | b, |
T * | a, | ||
float_type | freq, | ||
int | N | ||
) |
frequency transfer function at freq with iir A and B equations
References SPUC::cos().
complex<float_type> SPUC::ptr_freqz_point | ( | T | a, |
float_type | freq | ||
) |
frequency transfer function at freq for 1st order allpass
References SPUC::cos(), and SPUC::normalized().
quantized_type<T>::dtype SPUC::quantize | ( | T | in | ) |
Templated Quantize function template function that uses a class to allow template specialization.
References SPUC::quantizer< Numeric >::quantized().
long SPUC::real_quantize | ( | T | in | ) |
Templated quantize function.
References SPUC_TOLONG.
Referenced by SPUC::quantizer< Numeric >::quantized(), SPUC::quantizer< complex< T > >::quantized(), SPUC::quantizer< Numeric >::quantized_scale(), and SPUC::quantizer< complex< T > >::quantized_scale().
T SPUC::real_round | ( | T | in, |
long | bits | ||
) |
Templated round function.
Referenced by SPUC::rounder< Numeric >::rounded(), and SPUC::rounder< complex< T > >::rounded().
T SPUC::real_saturate | ( | T | in, |
long | bits | ||
) |
Templated saturation functions.
Referenced by SPUC::saturater< Numeric >::saturated(), and SPUC::saturater< complex< T > >::saturated().
|
inline |
T SPUC::round | ( | T | in, |
long | bits | ||
) |
Templated round function template function that uses a class to allow template specialization.
Referenced by SPUC::iir_allpass2< Numeric, Coeff >::clock(), SPUC::iir_delay_allpass1< Numeric, Coeff >::clock(), SPUC::iir_allpass1_halfband< SPUC::complex< CNumeric > >::clock(), SPUC::iir_allpass1< Numeric, Coeff >::clock(), SPUC::nested_shelf_allpass_2< Numeric, Coeff >::clock(), SPUC::nested_iir_allpass_2< Numeric, Coeff >::clock(), SPUC::qpsk< Numeric >::clock(), SPUC::iir_allpass_variable_cascade< Numeric, Coeff >::clock(), SPUC::iir_allpass1_cascade< Numeric, Coeff >::clock(), SPUC::qpsk_variable< Numeric >::clock(), SPUC::iir_allpass1_cascade< Numeric, Coeff >::get_hp_out(), and SPUC::iir_allpass_variable_cascade< Numeric, Coeff >::get_hp_out().
T SPUC::saturate | ( | T | in, |
long | bits | ||
) |
Templated saturate function template function that uses a class to allow template specialization.
Referenced by SPUC::qpsk_variable< Numeric >::clock(), and SPUC::qpsk_discriminators::pll_disc().
T SPUC::signbit | ( | T | in | ) |
Templated signbit function template function that uses a class to allow template specialization.
Referenced by SPUC::qpsk< Numeric >::clock(), SPUC::qpsk_variable< Numeric >::clock(), SPUC::fir_adapt< Numeric, Numeric >::update_lms(), and SPUC::fir_adapt< Numeric, Numeric >::update_lms_sign_coeff().
void SPUC::toeplitz | ( | vector< T > | x, |
matrix< T > & | A | ||
) |
Get Symmetric Toeplitz matrix from vector.
References SPUC::vector< T >::size().