IT++ 4.3.1
|
Functions | |
double | itpp::logb (double b, double x) |
Base-b logarithm. | |
int | itpp::pow2i (int x) |
Calculate two to the power of x (2^x); x is integer. | |
double | itpp::pow2 (double x) |
Calculate two to the power of x (2^x) | |
double | itpp::pow2 (int x) |
Calculate two to the power of x (2^x) for large integer x. | |
double | itpp::pow10 (double x) |
Calculate ten to the power of x (10^x) | |
double | itpp::dB (double x) |
Decibel of x (10*log10(x)) | |
double | itpp::inv_dB (double x) |
Inverse of decibel of x. | |
int | itpp::int2bits (int n) |
Calculate the number of bits needed to represent an integer n . | |
int | itpp::levels2bits (int n) |
Calculate the number of bits needed to represent n different values (levels). | |
double | itpp::trunc_log (double x) |
Truncated natural logarithm function. | |
double | itpp::trunc_exp (double x) |
Truncated exponential function. | |
double | itpp::log_add (double log_a, double log_b) |
Safe substitute for log(exp(log_a) + exp(log_b)) | |
vec | itpp::exp (const vec &x) |
Exp of the elements of a vector x . | |
cvec | itpp::exp (const cvec &x) |
Exp of the elements of a complex vector x . | |
mat | itpp::exp (const mat &m) |
Exp of the elements of a matrix m . | |
cmat | itpp::exp (const cmat &m) |
Exp of the elements of a complex matrix m . | |
vec | itpp::pow (const double x, const vec &y) |
Calculates x to the power of y (x^y) | |
mat | itpp::pow (const double x, const mat &y) |
Calculates x to the power of y (x^y) | |
vec | itpp::pow (const vec &x, const double y) |
Calculates x to the power of y (x^y) | |
mat | itpp::pow (const mat &x, const double y) |
Calculates x to the power of y (x^y) | |
vec | itpp::pow2 (const vec &x) |
Calculates two to the power of x (2^x) | |
vec | itpp::pow2 (const ivec &x) |
Calculates two to the power of x (2^x) for integer x. | |
mat | itpp::pow2 (const mat &x) |
Calculates two to the power of x (2^x) | |
mat | itpp::pow2 (const imat &x) |
Calculates two to the power of x (2^x) for integer x. | |
vec | itpp::pow10 (const vec &x) |
Calculates ten to the power of x (10^x) | |
mat | itpp::pow10 (const mat &x) |
Calculates ten to the power of x (10^x) | |
vec | itpp::log (const vec &x) |
The natural logarithm of the elements. | |
mat | itpp::log (const mat &x) |
The natural logarithm of the elements. | |
cvec | itpp::log (const cvec &x) |
The natural logarithm of the elements. | |
cmat | itpp::log (const cmat &x) |
The natural logarithm of the elements. | |
vec | itpp::log2 (const vec &x) |
log-2 of the elements | |
mat | itpp::log2 (const mat &x) |
log-2 of the elements | |
vec | itpp::log10 (const vec &x) |
log-10 of the elements | |
mat | itpp::log10 (const mat &x) |
log-10 of the elements | |
vec | itpp::logb (double b, const vec &x) |
log-b of x | |
mat | itpp::logb (double b, const mat &x) |
log-b of x | |
vec | itpp::dB (const vec &x) |
Calculates 10*log10(x) | |
mat | itpp::dB (const mat &x) |
Calculates 10*log10(x) | |
vec | itpp::inv_dB (const vec &x) |
Calulates the inverse of dB, 10^(x/10) | |
mat | itpp::inv_dB (const mat &x) |
Calculates the inverse of dB, 10^(x/10) | |
ivec | itpp::int2bits (const ivec &v) |
Calculate the number of bits needed to represent each integer in a vector. | |
ivec | itpp::levels2bits (const ivec &v) |
Calculate the number of bits needed to represent a numer of levels saved in a vector. | |
Variables | |
const double | itpp::log_double_max = std::log(std::numeric_limits<double>::max()) |
Constant definition to speed up trunc_log() and trunc_exp() | |
const double | itpp::log_double_min = std::log(std::numeric_limits<double>::min()) |
Constant definition to speed up trunc_log(), trunc_exp() and log_add() | |
|
inline |
|
inline |
Calculate two to the power of x (2^x); x is integer.
Definition at line 53 of file log_exp.h.
Referenced by itpp::Convolutional_Code::calc_metric(), itpp::IFFT_Fading_Generator::generate_Jakes(), itpp::Gold::Gold(), itpp::Gold::Gold(), itpp::Gold::Gold(), hadamard(), itpp::Hamming_Code::Hamming_Code(), itpp::Modulator_NCD::init_soft_demodulator(), itpp::Modulator_NRD::init_soft_demodulator(), itpp::Reed_Solomon::Reed_Solomon(), itpp::Convolutional_Code::set_generator_polynomials(), itpp::PAM::set_M(), itpp::PAM_c::set_M(), itpp::PSK::set_M(), itpp::QAM::set_M(), spectrum(), spectrum(), xcorr(), and zero_pad().
|
inline |
Calculate two to the power of x (2^x)
Definition at line 55 of file log_exp.h.
Referenced by hadamard(), itpp::LLR_calc_unit::operator<<, pow2(), pow2(), pow2(), and pow2().
|
inline |
|
inline |
|
inline |
Decibel of x (10*log10(x))
Definition at line 71 of file log_exp.h.
Referenced by dB(), dB(), and itpp::TDL_Channel::set_channel_profile_exponential().
|
inline |
Inverse of decibel of x.
Definition at line 73 of file log_exp.h.
Referenced by itpp::Channel_Specification::calc_mean_excess_delay(), itpp::Channel_Specification::calc_rms_delay_spread(), inv_dB(), and inv_dB().
|
inline |
Calculate the number of bits needed to represent an integer n
.
Definition at line 76 of file log_exp.h.
References it_assert.
Referenced by itpp::BCH::BCH(), int2bits(), and levels2bits().
|
inline |
Calculate the number of bits needed to represent n
different values (levels).
Definition at line 92 of file log_exp.h.
References int2bits(), and it_assert.
Referenced by dht(), itpp::IFFT_Fading_Generator::generate_Jakes(), levels2bits(), itpp::Vector_Quantizer::nobits(), self_dht(), itpp::Modulator< T >::set(), itpp::ND_UQAM::set_M(), itpp::PAM::set_M(), itpp::PAM_c::set_M(), itpp::PSK::set_M(), itpp::QAM::set_M(), itpp::Sort< T >::sort(), itpp::Sort< T >::sort_index(), spectrum(), spectrum(), and zero_pad().
|
inline |
Truncated natural logarithm function.
This truncated function provides a solution in the cases when the logarithm argument is less or equal to zero or infinity. The function checks for such extreme values and use some kind of truncation (saturation) before calculating the logarithm.
The truncated logarithm function can be used for calculation of log-likelihood in soft demodulators, when numerical instability problem might occur.
Definition at line 115 of file log_exp.h.
References log_double_max, and log_double_min.
Referenced by itpp::Modulator< T >::demodulate_soft_bits(), itpp::Modulator< T >::demodulate_soft_bits(), itpp::PAM_c::demodulate_soft_bits(), itpp::PAM_c::demodulate_soft_bits(), and itpp::Rec_Syst_Conv_Code::map_decode().
|
inline |
Truncated exponential function.
This truncated function provides a solution in the case when the exponent function results in infinity. The function checks for an extreme value and use truncation (saturation) before calculating the result.
The truncated exponential function can be used when numerical instability problem occurs for a standard exp function.
Definition at line 137 of file log_exp.h.
References log_double_max.
Referenced by itpp::MOG_diag::lhood_internal(), itpp::MOG_generic::lhood_internal(), itpp::Rec_Syst_Conv_Code::map_decode(), and itpp::MOG_diag_EM_sup::ml_update_params().
ITPP_EXPORT double itpp::log_add | ( | double | log_a, |
double | log_b ) |
Safe substitute for log(exp(log_a) + exp(log_b))
Definition at line 40 of file log_exp.cpp.
References log_double_min.
Referenced by itpp::MOG_diag::lhood_internal(), itpp::MOG_generic::lhood_internal(), itpp::Rec_Syst_Conv_Code::log_decode(), itpp::Rec_Syst_Conv_Code::log_decode_n2(), itpp::MOG_diag::log_lhood_internal(), itpp::MOG_generic::log_lhood_internal(), and itpp::MOG_diag_EM_sup::ml_update_params().
|
inline |
Exp of the elements of a vector x
.
Definition at line 155 of file log_exp.h.
References apply_function().
Referenced by arma_estimator(), cerf_rybicki(), cerfc_continued_fraction(), and fpica().
|
inline |
Exp of the elements of a complex vector x
.
Definition at line 160 of file log_exp.h.
References apply_function().
|
inline |
Exp of the elements of a matrix m
.
Definition at line 165 of file log_exp.h.
References apply_function().
|
inline |
Exp of the elements of a complex matrix m
.
Definition at line 170 of file log_exp.h.
References apply_function().
|
inline |
Calculates x to the power of y (x^y)
Definition at line 176 of file log_exp.h.
References apply_function().
Referenced by fpica(), mpower(), itpp::TDL_Channel::set_channel_profile(), and itpp::TDL_Channel::set_channel_profile().
|
inline |
Calculates x to the power of y (x^y)
Definition at line 181 of file log_exp.h.
References apply_function().
|
inline |
Calculates x to the power of y (x^y)
Definition at line 186 of file log_exp.h.
References apply_function().
|
inline |
Calculates x to the power of y (x^y)
Definition at line 191 of file log_exp.h.
References apply_function().
|
inline |
Calculates two to the power of x (2^x)
Definition at line 197 of file log_exp.h.
References apply_function(), and pow2().
|
inline |
|
inline |
Calculates two to the power of x (2^x)
Definition at line 212 of file log_exp.h.
References apply_function(), and pow2().
|
inline |
|
inline |
Calculates ten to the power of x (10^x)
Definition at line 230 of file log_exp.h.
References apply_function(), and pow10().
|
inline |
Calculates ten to the power of x (10^x)
Definition at line 235 of file log_exp.h.
References apply_function(), and pow10().
|
inline |
The natural logarithm of the elements.
Definition at line 241 of file log_exp.h.
References apply_function().
Referenced by arma_estimator(), erfinv(), itpp::Gamma_RNG::sample(), and itpp::MOG_generic::setup_weights().
|
inline |
The natural logarithm of the elements.
Definition at line 246 of file log_exp.h.
References apply_function().
|
inline |
The natural logarithm of the elements.
Definition at line 251 of file log_exp.h.
References apply_function().
|
inline |
The natural logarithm of the elements.
Definition at line 256 of file log_exp.h.
References apply_function().
ITPP_EXPORT vec itpp::log2 | ( | const vec & | x | ) |
log-2 of the elements
Definition at line 36 of file log_exp.cpp.
References apply_function(), and log2().
Referenced by itpp::EXIT::extrinsic_mutual_info(), hadamard(), log2(), log2(), itpp::ND_UPAM::set_M(), itpp::ND_UPSK::set_M(), itpp::ND_UQAM::set_M(), itpp::GF::set_size(), and xcorr().
ITPP_EXPORT mat itpp::log2 | ( | const mat & | x | ) |
log-2 of the elements
Definition at line 37 of file log_exp.cpp.
References apply_function(), and log2().
|
inline |
log-10 of the elements
Definition at line 271 of file log_exp.h.
References apply_function().
Referenced by itpp::TDL_Channel::get_avg_power_dB(), itpp::TDL_Channel::get_channel_profile(), and log_binom().
|
inline |
|
inline |
|
inline |
|
inline |
Calculates 10*log10(x)
Definition at line 293 of file log_exp.h.
References apply_function(), and dB().
|
inline |
Calculates 10*log10(x)
Definition at line 298 of file log_exp.h.
References apply_function(), and dB().
|
inline |
Calulates the inverse of dB, 10^(x/10)
Definition at line 304 of file log_exp.h.
References apply_function(), and inv_dB().
|
inline |
Calculates the inverse of dB, 10^(x/10)
Definition at line 309 of file log_exp.h.
References apply_function(), and inv_dB().
|
inline |
Calculate the number of bits needed to represent each integer in a vector.
Definition at line 315 of file log_exp.h.
References apply_function(), and int2bits().
|
inline |
Calculate the number of bits needed to represent a numer of levels saved in a vector.
Definition at line 321 of file log_exp.h.
References apply_function(), and levels2bits().
const double itpp::log_double_max = std::log(std::numeric_limits<double>::max()) |
Constant definition to speed up trunc_log() and trunc_exp()
Definition at line 99 of file log_exp.h.
Referenced by trunc_exp(), and trunc_log().
const double itpp::log_double_min = std::log(std::numeric_limits<double>::min()) |
Constant definition to speed up trunc_log(), trunc_exp() and log_add()
Definition at line 101 of file log_exp.h.
Referenced by log_add(), and trunc_log().