Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

Miscellaneous functions


Classes

class  SPUC::circ_buffer< T >
 Circular Buffer. More...
class  SPUC::cordic
 Cordic rotator. More...
class  SPUC::cfft< CPLX >
 General Purpose C++ complex FFT Transform. More...
class  SPUC::delay< Numeric >
 Template class for Delay line. More...
class  SPUC::max_pn
 Maximal Length Pseudorandom sequence generator. More...
class  SPUC::noise
 Gaussian noise routine. More...
class  SPUC::sigma_delta
 Simple 1st order All-digital Sigma Delta converter. More...

Functions

bmat SPUC::graycode (int m)
 Generate gray code of blocklength m.

The codes are contained as binary codewords {0,1} in the rows of the returned matrix. See also the gray() function in math/scalfunc.h.

int SPUC::hamming_distance (const bvec &a, const bvec &b)
 Calculate the Hamming distance between a and b.
int SPUC::weight (const bvec &a)
 Calculate the Hamming weight of a.
smat SPUC::wcdma_spreading_codes (int SF)
 Generates the OVSF (orthogonal variable spreading factor) spreading codes used in WCDMA.
double SPUC::gamma (double x)
 Gamma function.
double SPUC::sinc (double x)
 Sinc function. sinc(x) = sin(pi*x)/pi*x.
int SPUC::round_i (double x)
 Round to nearest integer.
int SPUC::ceil_i (double x)
 The nearest larger integer.
int SPUC::floor_i (double x)
 The nearest smaller integer.
double SPUC::round (double x)
 Round to nearest integer, return result in double.
bool SPUC::is_int (double x)
 Return true if x is an integer.
bool SPUC::is_even (int x)
 Return true if x is an even integer.
int SPUC::gray_code (int x)
 Convert to Gray Code.
double SPUC::binom (int n, int k)
 Compute the binomial coefficient "n over k" as a float.
int SPUC::binom_i (int n, int k)
 Compute the binomial coefficient "n over k" as an integer.
double SPUC::log_binom (int n, int k)
 Compute the base 10 logarithm of the binomial coefficient "n over k".
double SPUC::rad_to_deg (double x)
 Convert radians to degrees.
double SPUC::deg_to_rad (double x)
 Convert degrees to radians.
double SPUC::asinh (double x)
 Arcus sinhyp.
double SPUC::acosh (double x)
 Arcus coshyp.
double SPUC::atanh (double x)
 Arcus tanhyp.
double SPUC::sqr (double x)
 Square of x.
double SPUC::rem (double x, double y)
 The reminder of the division x/y.
double SPUC::sign (double x)
 The sign of x.
double SPUC::sgn (double x)
 The sign of x.
signed char SPUC::abs (signed char x)
 Absolute value.
short SPUC::abs (short x)
 Absolute value.
double SPUC::fact (int index)
 Calculates factorial coefficient for index <= 170.
long SPUC::mod (long k, long n)
 Calculates the modulus, i.e. the signed reminder after division.
long SPUC::gcd (long a, long b)
 returns the greatest common divisor (GCD) g of the elements a and b.
double SPUC::integrate (double(*f)(double), double A, double B, double tol=0.001)
 Integrate over the function f from A to B with tolerance tol.
template<class T>
Vector< T > SPUC::auto_corr (Vector< T > x)
template<class T>
Vector< T > SPUC::burg (Vector< T > &x, int P)
 AR model coefficients calculation using Burg algorithm.
template<class T>
SPUC::levdur (T *R)
ivec SPUC::find (const bvec &invector)
 Return a integer vector with indicies where bvec == 1.
mat SPUC::rotation_matrix (int dim, int plane1, int plane2, double angle)
 Create a rotation matrix that rotates the given plane angle radians. Note that the order of the planes are important!
void SPUC::house (const vec &x, vec &v, double &beta)
 Calcualte the Householder vector.
void SPUC::givens (double a, double b, double &c, double &s)
 Calculate the Givens rotation values.
void SPUC::givens (double a, double b, mat &m)
 Calculate the Givens rotation matrix.
mat SPUC::givens (double a, double b)
 Calculate the Givens rotation matrix.
void SPUC::givens_t (double a, double b, mat &m)
 Calculate the transposed Givens rotation matrix.
mat SPUC::givens_t (double a, double b)
 Calculate the transposed Givens rotation matrix.

Function Documentation

short SPUC::abs short  x  )  [inline]
 

Absolute value.

signed char SPUC::abs signed char  x  )  [inline]
 

Absolute value.

double SPUC::acosh double  x  ) 
 

Arcus coshyp.

double SPUC::asinh double  x  ) 
 

Arcus sinhyp.

double SPUC::atanh double  x  ) 
 

Arcus tanhyp.

template<class T>
Vector<T> SPUC::auto_corr Vector< T >  x  ) 
 

Author:
Tony Kirke, Copyright(c) 2001

double SPUC::binom int  n,
int  k
 

Compute the binomial coefficient "n over k" as a float.

int SPUC::binom_i int  n,
int  k
 

Compute the binomial coefficient "n over k" as an integer.

template<class T>
Vector<T> SPUC::burg Vector< T > &  x,
int  P
 

AR model coefficients calculation using Burg algorithm.

Author:
Tony Kirke, Copyright(c) 2001

Here is the call graph for this function:

int SPUC::ceil_i double  x  )  [inline]
 

The nearest larger integer.

double SPUC::deg_to_rad double  x  )  [inline]
 

Convert degrees to radians.

double SPUC::fact int  index  ) 
 

Calculates factorial coefficient for index <= 170.

ivec SPUC::find const bvec &  invector  ) 
 

Return a integer vector with indicies where bvec == 1.

int SPUC::floor_i double  x  )  [inline]
 

The nearest smaller integer.

double SPUC::gamma double  x  ) 
 

Gamma function.

long SPUC::gcd long  a,
long  b
 

returns the greatest common divisor (GCD) g of the elements a and b.

a and b must be non-negative integers. gdc(0,0) is 0 by convention; all other GCDs are positive integers.

mat SPUC::givens double  a,
double  b
 

Calculate the Givens rotation matrix.

void SPUC::givens double  a,
double  b,
mat &  m
 

Calculate the Givens rotation matrix.

void SPUC::givens double  a,
double  b,
double &  c,
double &  s
 

Calculate the Givens rotation values.

mat SPUC::givens_t double  a,
double  b
 

Calculate the transposed Givens rotation matrix.

void SPUC::givens_t double  a,
double  b,
mat &  m
 

Calculate the transposed Givens rotation matrix.

int SPUC::gray_code int  x  )  [inline]
 

Convert to Gray Code.

bmat SPUC::graycode int  m  ) 
 

Generate gray code of blocklength m.

The codes are contained as binary codewords {0,1} in the rows of the returned matrix. See also the gray() function in math/scalfunc.h.

int SPUC::hamming_distance const bvec &  a,
const bvec &  b
 

Calculate the Hamming distance between a and b.

void SPUC::house const vec &  x,
vec &  v,
double &  beta
 

Calcualte the Householder vector.

double SPUC::integrate double(*)(double)  f,
double  A,
double  B,
double  tol
 

Integrate over the function f from A to B with tolerance tol.

bool SPUC::is_even int  x  )  [inline]
 

Return true if x is an even integer.

bool SPUC::is_int double  x  )  [inline]
 

Return true if x is an integer.

template<class T>
T SPUC::levdur T *  R  ) 
 

Author:
Tony Kirke, Copyright(c) 2001

double SPUC::log_binom int  n,
int  k
 

Compute the base 10 logarithm of the binomial coefficient "n over k".

long SPUC::mod long  k,
long  n
 

Calculates the modulus, i.e. the signed reminder after division.

double SPUC::rad_to_deg double  x  )  [inline]
 

Convert radians to degrees.

double SPUC::rem double  x,
double  y
[inline]
 

The reminder of the division x/y.

mat SPUC::rotation_matrix int  dim,
int  plane1,
int  plane2,
double  angle
 

Create a rotation matrix that rotates the given plane angle radians. Note that the order of the planes are important!

double SPUC::round double  x  )  [inline]
 

Round to nearest integer, return result in double.

int SPUC::round_i double  x  )  [inline]
 

Round to nearest integer.

double SPUC::sgn double  x  )  [inline]
 

The sign of x.

double SPUC::sign double  x  )  [inline]
 

The sign of x.

double SPUC::sinc double  x  )  [inline]
 

Sinc function. sinc(x) = sin(pi*x)/pi*x.

double SPUC::sqr double  x  )  [inline]
 

Square of x.

smat SPUC::wcdma_spreading_codes int  SF  ) 
 

Generates the OVSF (orthogonal variable spreading factor) spreading codes used in WCDMA.

The codes are written row-wise in the return matrix.

int SPUC::weight const bvec &  a  ) 
 

Calculate the Hamming weight of a.


Generated on Fri Sep 16 11:06:47 2005 for spuc by  doxygen 1.4.4