IT++ Logo
Namespaces | Functions | Variables
log_exp.h File Reference

Logarithmic and exponenential functions - header file. More...

#include <itpp/config.h>
#include <itpp/base/help_functions.h>
#include <itpp/base/math/misc.h>
#include <limits>

Go to the source code of this file.

Namespaces

namespace  itpp
 

itpp namespace


Functions

double log1p (double x)
 Lograrithm of an argument x plus one.
double log2 (double x)
 Base-2 logarithm.
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::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 inteager n.
int itpp::levels2bits (int n)
 Calculate the number of bits needed to represent n different values (levels).
int itpp::needed_bits (int n)
 Deprecated function. Please use int2bits() or levels2bits() instead.
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)
mat itpp::pow2 (const mat &x)
 Calculates two to the power of x (2^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::needed_bits (const ivec &v)
 Deprecated function. Please use int2bits() or levels2bits() instead.
ivec itpp::int2bits (const ivec &v)
 Calculate the number of bits needed to represent each inteager 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()

Detailed Description

Logarithmic and exponenential functions - header file.

Author:
Tony Ottosson, Adam Piatyszek and Conrad Sanderson

-------------------------------------------------------------------------

IT++ - C++ library of mathematical, signal processing, speech processing, and communications classes and functions

Copyright (C) 1995-2008 (see AUTHORS file for a list of contributors)

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

-------------------------------------------------------------------------

Definition in file log_exp.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
SourceForge Logo

Generated on Wed Dec 7 2011 03:39:04 for IT++ by Doxygen 1.7.4