IT++ Logo Newcom Logo

Miscellaneous Functions


Functions

itpp::vec itpp::gamma (const itpp::vec &x)
 The gamma function.
itpp::mat itpp::gamma (const itpp::mat &x)
 The gamma function.
vec itpp::ceil (const vec &x)
 Round to nearest upper integer.
mat itpp::ceil (const mat &x)
 Round to nearest upper integer.
vec itpp::floor (const vec &x)
 Round to nearest lower integer.
mat itpp::floor (const mat &x)
 Round to nearest lower integer.
vec itpp::round (const vec &x)
 Round to nearest integer.
mat itpp::round (const mat &x)
 Round to nearest integer.
ivec itpp::round_i (const vec &x)
 Round to nearest integer and return ivec.
imat itpp::round_i (const mat &x)
 Round to nearest integer and return imat.
vec itpp::abs (const vec &x)
 Absolute value.
mat itpp::abs (const mat &x)
 Absolute value.
ivec itpp::abs (const ivec &data)
 Absolute value.
imat itpp::abs (const imat &data)
 Absolute value.
vec itpp::sqr (const vec &x)
 Square of elements.
mat itpp::sqr (const mat &x)
 Square of elements.
vec itpp::sqr (const cvec &x)
 Square of elements.
mat itpp::sqr (const cmat &x)
 Square of elements.
vec itpp::sign (const vec &x)
 Signum function.
mat itpp::sign (const mat &x)
 Signum function.
vec itpp::sqrt (const vec &x)
 Square root of the elements.
mat itpp::sqrt (const mat &x)
 Square root of the elements.
vec itpp::rem (const vec &x, const double &y)
 Elementwise reminder of the division x/y for vec and double.
vec itpp::rem (const double &x, const vec &y)
 Elementwise reminder of the division x/y for double and vec.
mat itpp::rem (const mat &x, const double &y)
 Elementwise reminder of the division x/y for mat and double.
mat itpp::rem (const double &x, const mat &y)
 Elementwise reminder of the division x/y for double and mat.
vec itpp::abs (const cvec &data)
 Absolute value.
mat itpp::abs (const cmat &data)
 Absolute value.
vec itpp::real (const cvec &data)
 Real part of complex values.
mat itpp::real (const cmat &data)
 Real part of complex values.
vec itpp::imag (const cvec &data)
 Imaginary part of complex values.
mat itpp::imag (const cmat &data)
 Imaginary part of complex values.
vec itpp::arg (const cvec &data)
 Argument (angle).
mat itpp::arg (const cmat &data)
 Argument (angle).
vec itpp::angle (const cvec &x)
 Angle.
mat itpp::angle (const cmat &x)
 Angle.
cvec itpp::conj (const cvec &data)
 Conjugate of complex value.
cmat itpp::conj (const cmat &data)
 Conjugate of complex value.
bool itpp::all (const Vec< bin > &testvec)
 Returns true if all elements are ones and false otherwise.
bool itpp::any (const Vec< bin > &testvec)
 Returns true if any element is one and false otherwise.
vec itpp::round_to_zero (const vec &x, double threshold=1e-14)
 Round each element to zero if element < threshold.
mat itpp::round_to_zero (const mat &x, double threshold=1e-14)
 Round each element to zero if element < threshold.
cvec itpp::round_to_zero (const cvec &x, double threshold)
 Round each element to zero if element < threshold.
cmat itpp::round_to_zero (const cmat &x, double threshold)
 Round each element to zero if element < threshold.
vec itpp::vec_function (double(*f)(double), const vec &x)
 Help function to call for a function: vec function(vec).
cvec itpp::cvec_function (std::complex< double >(*f)(const std::complex< double > &), const cvec &x)
 Help function to call for a function: cvec function(cvec).
mat itpp::mat_function (double(*f)(double), const mat &x)
 Help function to call for a function: mat function(mat).
cmat itpp::cmat_function (std::complex< double >(*f)(const std::complex< double > &), const cmat &x)
 Help function to call for a function: cmat function(cmat).
vec itpp::double_vec_function (double(*f)(double, double), const double x, const vec &y)
 Help function to call for a function: vec function(double,vec).
mat itpp::double_mat_function (double(*f)(double, double), const double x, const mat &y)
 Help function to call for a function: mat function(double,mat).
vec itpp::vec_double_function (double(*f)(double, double), const vec &x, const double y)
 Help function to call for a function: vec function(vec,double).
mat itpp::mat_double_function (double(*f)(double, double), const mat &x, const double y)
 Help function to call for a function: mat function(mat,double).
double asinh (double x)
 Arcus sinhyp.
double acosh (double x)
 Arcus coshyp.
double atanh (double x)
 Arcus tanhyp.
double tgamma (double x)
 True gamma function.
double lgamma (double x)
 Lograrithm of an absolute gamma function.
double itpp::gamma (double x)
 Gamma function.
double itpp::sinc (double x)
 Sinc function. sinc(x) = sin(pi*x)/pi*x.
int itpp::round_i (double x)
 Round to nearest integer.
int itpp::ceil_i (double x)
 The nearest larger integer.
int itpp::floor_i (double x)
 The nearest smaller integer.
double itpp::round (double x)
 Round to nearest integer, return result in double.
bool itpp::is_int (double x)
 Return true if x is an integer.
bool itpp::is_even (int x)
 Return true if x is an even integer.
int itpp::gray_code (int x)
 Convert to Gray Code.
double itpp::binom (int n, int k)
 Compute the binomial coefficient "n over k" as a float.
int itpp::binom_i (int n, int k)
 Compute the binomial coefficient "n over k" as an integer.
double itpp::log_binom (int n, int k)
 Compute the base 10 logarithm of the binomial coefficient "n over k".
double itpp::rad_to_deg (double x)
 Convert radians to degrees.
double itpp::deg_to_rad (double x)
 Convert degrees to radians.
double itpp::sqr (double x)
 Square of x.
double itpp::sqr (std::complex< double > x)
 Square of complex-valued x, ||x||^2.
double itpp::rem (double x, double y)
 The reminder of the division x/y.
double itpp::sign (double x)
 The sign of x.
double itpp::sgn (double x)
 The sign of x.
signed char itpp::abs (signed char x)
 Absolute value.
short itpp::abs (short x)
 Absolute value.
int itpp::abs (int x)
 Absolute value.
double itpp::fact (int index)
 Calculates factorial coefficient for index <= 170.
long itpp::mod (long k, long n)
 Calculates the modulus, i.e. the signed reminder after division.
long itpp::gcd (long a, long b)
 returns the greatest common divisor (GCD) g of the elements a and b.
double itpp::round_to_zero (double x, double threshold=1e-14)
 Round x to zero if abs(x) is smaller than threshold.
std::complex< double > itpp::round_to_zero (const std::complex< double > &x, double threshold)
 Round each part of x smaller than threshold to zero.
ivec itpp::find (const bvec &invector)
 Return a integer vector with indicies where bvec == 1.
mat itpp::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 itpp::house (const vec &x, vec &v, double &beta)
 Calcualte the Householder vector.
void itpp::givens (double a, double b, double &c, double &s)
 Calculate the Givens rotation values.
void itpp::givens (double a, double b, mat &m)
 Calculate the Givens rotation matrix.
mat itpp::givens (double a, double b)
 Calculate the Givens rotation matrix.
void itpp::givens_t (double a, double b, mat &m)
 Calculate the transposed Givens rotation matrix.
mat itpp::givens_t (double a, double b)
 Calculate the transposed Givens rotation matrix.
bmat itpp::graycode (int m)
 Generate gray code of blocklength m.
int itpp::hamming_distance (const bvec &a, const bvec &b)
 Calculate the Hamming distance between a and b.
int itpp::weight (const bvec &a)
 Calculate the Hamming weight of a.
smat itpp::wcdma_spreading_codes (int SF)
 Generates the OVSF (orthogonal variable spreading factor) spreading codes used in WCDMA.

Function Documentation

itpp::vec gamma const itpp::vec x  )  [inline]
 

The gamma function.

Definition at line 48 of file elmatfunc.h.

References itpp::vec_function().

itpp::mat gamma const itpp::mat x  )  [inline]
 

The gamma function.

Definition at line 54 of file elmatfunc.h.

References itpp::mat_function().

vec ceil const vec &  x  )  [inline]
 

Round to nearest upper integer.

Definition at line 222 of file elmatfunc.h.

References itpp::vec_function().

mat ceil const mat &  x  )  [inline]
 

Round to nearest upper integer.

Definition at line 224 of file elmatfunc.h.

References itpp::mat_function().

Referenced by itpp::bin2oct(), itpp::ceil_i(), itpp::Sequence_Interleaver< T >::deinterleave(), itpp::Cross_Interleaver< T >::deinterleave(), itpp::Block_Interleaver< T >::deinterleave(), itpp::Sequence_Interleaver< T >::interleave(), itpp::Cross_Interleaver< T >::interleave(), itpp::Block_Interleaver< T >::interleave(), and itpp::xcorr().

vec floor const vec &  x  )  [inline]
 

Round to nearest lower integer.

Definition at line 226 of file elmatfunc.h.

References itpp::vec_function().

mat floor const mat &  x  )  [inline]
 

Round to nearest lower integer.

Definition at line 228 of file elmatfunc.h.

References itpp::mat_function().

Referenced by itpp::Reed_Solomon::decode(), itpp::Hamming_Code::decode(), itpp::Extended_Golay::decode(), itpp::BCH::decode(), itpp::Multicode_Spread_1d::despread(), itpp::Spread_1d::despread(), itpp::Reed_Solomon::encode(), itpp::Hamming_Code::encode(), itpp::Extended_Golay::encode(), itpp::BCH::encode(), itpp::floor_i(), itpp::jake_filter(), itpp::mod(), itpp::Fix_Base::scale_and_apply_modes(), itpp::Multicode_Spread_1d::spread(), and itpp::LLR_calc_unit::to_qllr().

vec round const vec &  x  )  [inline]
 

Round to nearest integer.

Definition at line 231 of file elmatfunc.h.

References itpp::vec_function().

Referenced by itpp::Fix_Base::scale_and_apply_modes().

mat round const mat &  x  )  [inline]
 

Round to nearest integer.

Definition at line 233 of file elmatfunc.h.

References itpp::mat_function().

ivec round_i const vec &  x  )  [inline]
 

Round to nearest integer and return ivec.

Definition at line 236 of file elmatfunc.h.

imat round_i const mat &  x  )  [inline]
 

Round to nearest integer and return imat.

Definition at line 238 of file elmatfunc.h.

vec abs const vec &  x  )  [inline]
 

Absolute value.

Definition at line 242 of file elmatfunc.h.

References itpp::vec_function().

mat abs const mat &  x  )  [inline]
 

Absolute value.

Definition at line 244 of file elmatfunc.h.

References itpp::mat_function().

ivec itpp::abs const ivec &  x  ) 
 

Absolute value.

Definition at line 60 of file elmatfunc.cpp.

References itpp::abs().

imat itpp::abs const imat &  x  ) 
 

Absolute value.

Definition at line 70 of file elmatfunc.cpp.

References itpp::abs().

vec sqr const vec &  x  )  [inline]
 

Square of elements.

Definition at line 250 of file elmatfunc.h.

References itpp::vec_function().

mat sqr const mat &  x  )  [inline]
 

Square of elements.

Definition at line 252 of file elmatfunc.h.

References itpp::mat_function().

vec itpp::sqr const cvec &  x  ) 
 

Square of elements.

Definition at line 38 of file elmatfunc.cpp.

References itpp::sqr().

mat itpp::sqr const cmat &  x  ) 
 

Square of elements.

Definition at line 47 of file elmatfunc.cpp.

References itpp::sqr().

vec sign const vec &  x  )  [inline]
 

Signum function.

Definition at line 258 of file elmatfunc.h.

References itpp::vec_function().

mat sign const mat &  x  )  [inline]
 

Signum function.

Definition at line 260 of file elmatfunc.h.

References itpp::mat_function().

vec sqrt const vec &  x  )  [inline]
 

Square root of the elements.

Definition at line 263 of file elmatfunc.h.

References itpp::vec_function().

mat sqrt const mat &  x  )  [inline]
 

Square root of the elements.

Definition at line 265 of file elmatfunc.h.

References itpp::mat_function().

Referenced by acosh(), asinh(), itpp::AWGN_Channel::AWGN_Channel(), itpp::QPSK::demodulate_soft_bits(), itpp::dht(), itpp::erfinv(), itpp::givens(), itpp::givens_t(), itpp::house(), itpp::jake_filter(), itpp::norm(), itpp::quadl(), itpp::Complex_Normal_RNG::sample(), itpp::Laplace_RNG::sample(), itpp::Normal_RNG::sample(), itpp::sd(), itpp::Newton_Search::search(), itpp::self_dht(), itpp::Turbo_Codec::set_awgn_channel_parameters(), itpp::Rec_Syst_Conv_Code::set_awgn_channel_parameters(), itpp::ND_UPAM::set_Gray_PAM(), itpp::ND_UQAM::set_Gray_QAM(), itpp::QAM::set_M(), itpp::PAM::set_M(), itpp::AWGN_Channel::set_noise(), itpp::Root_Raised_Cosine< T1 >::set_pulse_shape(), itpp::Complex_Normal_RNG::setup(), itpp::Normal_RNG::setup(), itpp::Stat::sigma(), itpp::sqrt_win(), itpp::sqrtm(), itpp::xcorr(), and itpp::xcorr_old().

vec rem const vec &  x,
const double &  y
[inline]
 

Elementwise reminder of the division x/y for vec and double.

Definition at line 270 of file elmatfunc.h.

References itpp::vec_double_function().

vec rem const double &  x,
const vec &  y
[inline]
 

Elementwise reminder of the division x/y for double and vec.

Definition at line 272 of file elmatfunc.h.

References itpp::double_vec_function().

mat rem const mat &  x,
const double &  y
[inline]
 

Elementwise reminder of the division x/y for mat and double.

Definition at line 274 of file elmatfunc.h.

References itpp::mat_double_function().

mat rem const double &  x,
const mat &  y
[inline]
 

Elementwise reminder of the division x/y for double and mat.

Definition at line 276 of file elmatfunc.h.

References itpp::double_mat_function().

vec itpp::abs const cvec &  x  ) 
 

Absolute value.

Definition at line 83 of file elmatfunc.cpp.

References itpp::abs().

mat itpp::abs const cmat &  x  ) 
 

Absolute value.

Definition at line 93 of file elmatfunc.cpp.

References itpp::abs().

vec itpp::real const cvec &  x  ) 
 

Real part of complex values.

Definition at line 106 of file elmatfunc.cpp.

Referenced by itpp::CFix::CFix(), itpp::Multicode_Spread_2d::despread(), itpp::Spread_2d::despread(), itpp::CFix::set(), itpp::Multicode_Spread_2d::spread(), itpp::Spread_2d::spread(), itpp::Mat< Num_T >::to_cmat(), and itpp::Vec< Num_T >::to_cvec().

mat itpp::real const cmat &  x  ) 
 

Real part of complex values.

Definition at line 116 of file elmatfunc.cpp.

vec itpp::imag const cvec &  x  ) 
 

Imaginary part of complex values.

Definition at line 129 of file elmatfunc.cpp.

Referenced by itpp::CFix::CFix(), itpp::CFix::set(), itpp::Mat< Num_T >::to_cmat(), and itpp::Vec< Num_T >::to_cvec().

mat itpp::imag const cmat &  x  ) 
 

Imaginary part of complex values.

Definition at line 138 of file elmatfunc.cpp.

vec itpp::arg const cvec &  x  ) 
 

Argument (angle).

Definition at line 151 of file elmatfunc.cpp.

References itpp::arg().

mat itpp::arg const cmat &  x  ) 
 

Argument (angle).

Definition at line 161 of file elmatfunc.cpp.

Referenced by itpp::angle(), itpp::arg(), and itpp::PSK::demodulate_bits().

vec angle const cvec &  x  )  [inline]
 

Angle.

Definition at line 295 of file elmatfunc.h.

References itpp::arg().

mat angle const cmat &  x  )  [inline]
 

Angle.

Definition at line 297 of file elmatfunc.h.

References itpp::arg().

cvec itpp::conj const cvec &  x  ) 
 

Conjugate of complex value.

Definition at line 174 of file elmatfunc.cpp.

References itpp::conj().

cmat itpp::conj const cmat &  x  ) 
 

Conjugate of complex value.

Definition at line 184 of file elmatfunc.cpp.

References itpp::conj().

bool itpp::all const Vec< bin > &  testvec  ) 
 

Returns true if all elements are ones and false otherwise.

Definition at line 197 of file elmatfunc.cpp.

bool itpp::any const Vec< bin > &  testvec  ) 
 

Returns true if any element is one and false otherwise.

Definition at line 204 of file elmatfunc.cpp.

Referenced by itpp::poly2rc(), and itpp::rc2poly().

vec round_to_zero const vec &  x,
double  threshold = 1e-14
[inline]
 

Round each element to zero if element < threshold.

Definition at line 309 of file elmatfunc.h.

References itpp::vec_double_function().

mat round_to_zero const mat &  x,
double  threshold = 1e-14
[inline]
 

Round each element to zero if element < threshold.

Definition at line 313 of file elmatfunc.h.

References itpp::mat_double_function().

cvec itpp::round_to_zero const cvec &  x,
double  threshold = 1e-14
 

Round each element to zero if element < threshold.

Definition at line 211 of file elmatfunc.cpp.

References itpp::round_to_zero().

cmat itpp::round_to_zero const cmat &  x,
double  threshold = 1e-14
 

Round each element to zero if element < threshold.

Definition at line 220 of file elmatfunc.cpp.

References itpp::round_to_zero().

vec vec_function double(*)(double)  f,
const vec &  x
[inline]
 

Help function to call for a function: vec function(vec).

Definition at line 46 of file help_functions.h.

Referenced by itpp::abs(), itpp::acos(), itpp::acosh(), itpp::asin(), itpp::asinh(), itpp::atan(), itpp::atanh(), itpp::ceil(), itpp::cos(), itpp::cosh(), itpp::dB(), itpp::erf(), itpp::erfc(), itpp::erfinv(), itpp::exp(), itpp::floor(), itpp::gamma(), itpp::inv_dB(), itpp::log(), itpp::log10(), itpp::log2(), itpp::pow10(), itpp::pow2(), itpp::Qfunc(), itpp::quad(), itpp::quadl(), itpp::round(), itpp::sign(), itpp::sin(), itpp::sinc(), itpp::sinh(), itpp::sqr(), itpp::sqrt(), itpp::tan(), and itpp::tanh().

cvec cvec_function std::complex< double >(*)(const std::complex< double > &)  f,
const cvec &  x
[inline]
 

Help function to call for a function: cvec function(cvec).

Definition at line 58 of file help_functions.h.

Referenced by itpp::erf(), itpp::exp(), and itpp::log().

mat mat_function double(*)(double)  f,
const mat &  x
[inline]
 

Help function to call for a function: mat function(mat).

Definition at line 70 of file help_functions.h.

Referenced by itpp::abs(), itpp::acos(), itpp::acosh(), itpp::asin(), itpp::asinh(), itpp::atan(), itpp::atanh(), itpp::ceil(), itpp::cos(), itpp::cosh(), itpp::dB(), itpp::erf(), itpp::erfc(), itpp::erfinv(), itpp::exp(), itpp::floor(), itpp::gamma(), itpp::inv_dB(), itpp::log(), itpp::log10(), itpp::log2(), itpp::pow10(), itpp::pow2(), itpp::Qfunc(), itpp::round(), itpp::sign(), itpp::sin(), itpp::sinc(), itpp::sinh(), itpp::sqr(), itpp::sqrt(), itpp::tan(), and itpp::tanh().

cmat cmat_function std::complex< double >(*)(const std::complex< double > &)  f,
const cmat &  x
[inline]
 

Help function to call for a function: cmat function(cmat).

Definition at line 85 of file help_functions.h.

Referenced by itpp::erf(), itpp::exp(), and itpp::log().

vec double_vec_function double(*)(double, double)  f,
const double  x,
const vec &  y
[inline]
 

Help function to call for a function: vec function(double,vec).

Definition at line 100 of file help_functions.h.

Referenced by itpp::logb(), itpp::pow(), and itpp::rem().

mat double_mat_function double(*)(double, double)  f,
const double  x,
const mat &  y
[inline]
 

Help function to call for a function: mat function(double,mat).

Definition at line 112 of file help_functions.h.

Referenced by itpp::logb(), itpp::pow(), and itpp::rem().

vec vec_double_function double(*)(double, double)  f,
const vec &  x,
const double  y
[inline]
 

Help function to call for a function: vec function(vec,double).

Definition at line 127 of file help_functions.h.

Referenced by itpp::pow(), itpp::rem(), and itpp::round_to_zero().

mat mat_double_function double(*)(double, double)  f,
const mat &  x,
const double  y
[inline]
 

Help function to call for a function: mat function(mat,double).

Definition at line 139 of file help_functions.h.

Referenced by itpp::pow(), itpp::rem(), and itpp::round_to_zero().

double asinh double  x  ) 
 

Arcus sinhyp.

Definition at line 75 of file scalfunc.cpp.

References itpp::log(), and itpp::sqrt().

double acosh double  x  ) 
 

Arcus coshyp.

Definition at line 82 of file scalfunc.cpp.

References it_error_if, itpp::log(), and itpp::sqrt().

double atanh double  x  ) 
 

Arcus tanhyp.

Definition at line 90 of file scalfunc.cpp.

References it_error_if, and itpp::log().

double tgamma double  x  ) 
 

True gamma function.

Definition at line 41 of file scalfunc.cpp.

References itpp::exp(), and itpp::log().

Referenced by itpp::gamma(), and lgamma().

double lgamma double  x  ) 
 

Lograrithm of an absolute gamma function.

Definition at line 58 of file scalfunc.cpp.

References itpp::log(), and tgamma().

double itpp::gamma double  x  ) 
 

Gamma function.

Definition at line 182 of file scalfunc.cpp.

References tgamma().

Referenced by itpp::Rec_Syst_Conv_Code::log_decode(), itpp::Rec_Syst_Conv_Code::log_decode_n2(), itpp::Rec_Syst_Conv_Code::map_decode(), and itpp::Weibull_RNG::setup().

double sinc double  x  )  [inline]
 

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

Definition at line 226 of file scalfunc.h.

References itpp::sin().

Referenced by itpp::fir1(), and itpp::Raised_Cosine< T1 >::set_pulse_shape().

int round_i double  x  )  [inline]
 

Round to nearest integer.

Definition at line 237 of file scalfunc.h.

Referenced by itpp::Cross_Interleaver< T >::deinterleave(), itpp::QAM::demodulate_bits(), itpp::PSK::demodulate_bits(), itpp::PAM::demodulate_bits(), itpp::Modulator_1d::set(), itpp::ND_UPAM::set_Gray_PAM(), itpp::ND_UPSK::set_Gray_PSK(), itpp::ND_UQAM::set_Gray_QAM(), itpp::QAM::set_M(), itpp::PSK::set_M(), itpp::PAM::set_M(), and itpp::GF::set_size().

int ceil_i double  x  )  [inline]
 

The nearest larger integer.

Definition at line 239 of file scalfunc.h.

References itpp::ceil().

Referenced by itpp::hadamard(), and itpp::needed_bits().

int floor_i double  x  )  [inline]
 

The nearest smaller integer.

Definition at line 241 of file scalfunc.h.

References itpp::floor().

Referenced by itpp::filter_design_autocorrelation(), itpp::I_Uniform_RNG::sample(), and itpp::GF2mat::T_fact().

double round double  x  )  [inline]
 

Round to nearest integer, return result in double.

Definition at line 244 of file scalfunc.h.

bool is_int double  x  )  [inline]
 

Return true if x is an integer.

Definition at line 247 of file scalfunc.h.

bool is_even int  x  )  [inline]
 

Return true if x is an even integer.

Definition at line 250 of file scalfunc.h.

Referenced by itpp::Modulator_2d::set(), itpp::QAM::set_M(), itpp::Root_Raised_Cosine< T1 >::set_pulse_shape(), and itpp::Raised_Cosine< T1 >::set_pulse_shape().

int gray_code int  x  )  [inline]
 

Convert to Gray Code.

Definition at line 314 of file scalfunc.h.

Referenced by itpp::ND_UQAM::set_Gray_QAM(), and itpp::QAM::set_M().

double itpp::binom int  n,
int  k
 

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

Definition at line 407 of file scalfunc.cpp.

References it_assert.

int itpp::binom_i int  n,
int  k
 

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

Definition at line 422 of file scalfunc.cpp.

References it_assert.

double itpp::log_binom int  n,
int  k
 

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

Definition at line 437 of file scalfunc.cpp.

References it_assert, and itpp::log10().

double rad_to_deg double  x  )  [inline]
 

Convert radians to degrees.

Definition at line 326 of file scalfunc.h.

double deg_to_rad double  x  )  [inline]
 

Convert degrees to radians.

Definition at line 328 of file scalfunc.h.

double sqr double  x  )  [inline]
 

Square of x.

Definition at line 336 of file scalfunc.h.

double sqr std::complex< double >  x  )  [inline]
 

Square of complex-valued x, ||x||^2.

Definition at line 338 of file scalfunc.h.

Referenced by itpp::QAM::demodulate_soft_bits(), itpp::PSK::demodulate_soft_bits(), itpp::PAM::demodulate_soft_bits(), itpp::Modulator_2d::demodulate_soft_bits(), itpp::QAM::demodulate_soft_bits_approx(), itpp::PSK::demodulate_soft_bits_approx(), itpp::PAM::demodulate_soft_bits_approx(), itpp::Modulator_2d::demodulate_soft_bits_approx(), itpp::energy(), itpp::filter_design_autocorrelation(), itpp::filter_spectrum(), itpp::AWGN_Channel::get_noise(), itpp::house(), itpp::Modulator_NCD::map_demod(), itpp::Modulator_NRD::map_demod(), itpp::norm(), itpp::poly2ac(), itpp::sd(), itpp::Line_Search::search(), itpp::PAM::set_M(), itpp::Root_Raised_Cosine< T1 >::set_pulse_shape(), itpp::Raised_Cosine< T1 >::set_pulse_shape(), itpp::spectrum(), itpp::sqr(), itpp::Modulator_NRD::update_norm(), and itpp::vqtrain().

double rem double  x,
double  y
[inline]
 

The reminder of the division x/y.

Definition at line 340 of file scalfunc.h.

double sign double  x  )  [inline]
 

The sign of x.

Definition at line 342 of file scalfunc.h.

Referenced by itpp::quadl(), and itpp::Vec< Num_T >::set().

double sgn double  x  )  [inline]
 

The sign of x.

Definition at line 344 of file scalfunc.h.

Referenced by itpp::erfinv().

signed char abs signed char  x  )  [inline]
 

Absolute value.

Definition at line 347 of file scalfunc.h.

short abs short  x  )  [inline]
 

Absolute value.

Definition at line 349 of file scalfunc.h.

int abs int  x  )  [inline]
 

Absolute value.

Definition at line 351 of file scalfunc.h.

double itpp::fact int  index  ) 
 

Calculates factorial coefficient for index <= 170.

Definition at line 368 of file scalfunc.cpp.

References it_error_if.

long itpp::mod long  k,
long  n
 

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

Definition at line 378 of file scalfunc.cpp.

References itpp::floor().

Referenced by itpp::Turbo_Codec::wcdma_turbo_interleaver_sequence().

long itpp::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.

Definition at line 387 of file scalfunc.cpp.

References itpp::abs(), and it_assert.

Referenced by itpp::Turbo_Codec::wcdma_turbo_interleaver_sequence().

double round_to_zero double  x,
double  threshold = 1e-14
[inline]
 

Round x to zero if abs(x) is smaller than threshold.

Definition at line 370 of file scalfunc.h.

References itpp::abs().

Referenced by itpp::round_to_zero().

std::complex< double > itpp::round_to_zero const std::complex< double > &  x,
double  threshold = 1e-14
 

Round each part of x smaller than threshold to zero.

Definition at line 450 of file scalfunc.cpp.

References itpp::round_to_zero().

ivec itpp::find const bvec &  invector  ) 
 

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

Definition at line 41 of file specmat.cpp.

References it_assert.

mat itpp::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!

Definition at line 263 of file specmat.cpp.

References itpp::cos(), it_assert, and itpp::sin().

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

Calcualte the Householder vector.

Definition at line 285 of file specmat.cpp.

References itpp::energy(), itpp::sqr(), and itpp::sqrt().

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

Calculate the Givens rotation values.

Definition at line 311 of file specmat.cpp.

References itpp::sqrt().

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

Calculate the Givens rotation matrix.

Definition at line 333 of file specmat.cpp.

References itpp::sqrt().

mat itpp::givens double  a,
double  b
 

Calculate the Givens rotation matrix.

Definition at line 363 of file specmat.cpp.

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

Calculate the transposed Givens rotation matrix.

Definition at line 371 of file specmat.cpp.

References itpp::sqrt().

mat itpp::givens_t double  a,
double  b
 

Calculate the transposed Givens rotation matrix.

Definition at line 401 of file specmat.cpp.

bmat itpp::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.

Definition at line 42 of file commfunc.cpp.

References itpp::ones_b(), itpp::reverse(), and itpp::zeros_b().

Referenced by itpp::ND_UPAM::set_Gray_PAM(), itpp::ND_UPSK::set_Gray_PSK(), itpp::ND_UQAM::set_Gray_QAM(), itpp::QAM::set_M(), itpp::PSK::set_M(), and itpp::PAM::set_M().

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

Calculate the Hamming distance between a and b.

Definition at line 61 of file commfunc.cpp.

References it_assert1.

int itpp::weight const bvec &  a  ) 
 

Calculate the Hamming weight of a.

Definition at line 73 of file commfunc.cpp.

Referenced by itpp::Extended_Golay::decode().

smat itpp::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.

Definition at line 170 of file sequence.cpp.

References it_assert, and itpp::Mat< Num_T >::set_row().

SourceForge Logo

Generated on Fri Jan 11 08:51:41 2008 for IT++ by Doxygen 1.3.9.1