IT++ Logo Newcom Logo

scalfunc.h File Reference

Definitions of scalar functions. More...

#include <itpp/config.h>
#include <itpp/base/itassert.h>
#include <complex>
#include <limits>

Go to the source code of this file.

Namespaces

namespace  itpp

Functions

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 cbrt (double x)
double itpp::trunc_log (double x)
 Truncated natural logarithm function.
double itpp::trunc_exp (double x)
 Truncated exponential function.
double itpp::gamma (double x)
 Gamma function.
double itpp::Qfunc (double x)
 Q-function.
double itpp::erfinv (double x)
 Inverse of error function.
std::complex< double > itpp::erf (const std::complex< double > &z)
 Error function for complex argument.
double itpp::log2 (double x)
 Base-2 logarithm.
double itpp::logb (double b, double x)
 Base-b logarithm.
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::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. Might be removed in future releases. Please use int2bits() or levels2bits() instead.
int itpp::needed_bits (double n)
 Deprecated function. Might be removed in future releases. Please use int2bits() or levels2bits() instead.
int itpp::pow2i (int x)
 Integer 2^x.
int itpp::pow2 (int x)
 Calculate two to the power of x (2^x).
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.
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=1e-14)
 Round each part of x smaller than threshold to zero.

Variables

int signgam
const double itpp::pi = 3.14159265358979323846
 Constant pi.
const double itpp::m_2pi = 2 * pi
 Constant 2*Pi.
const double itpp::eps = std::numeric_limits<double>::epsilon()
 Constant eps.
const double itpp::log_double_max = std::log(std::numeric_limits<double>::max())
 Constant definition to speed up trunc_log and trunc_exp functions.
const double itpp::log_double_min = std::log(std::numeric_limits<double>::min())
 Constant definition to speed up trunc_log and trunc_exp functions.


Detailed Description

Definitions of scalar functions.

Author:
Tony Ottosson, Pal Frenger and Adam Piatyszek
Date
2006-10-24 21:54:50 +0200 (wto, 24 paź 2006)
Revision
694

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

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

Copyright (C) 1995-2006 (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 scalfunc.h.

SourceForge Logo

Generated on Thu Apr 19 14:23:59 2007 for IT++ by Doxygen 1.4.6