IT++ Logo Newcom Logo

stat.h File Reference

Definitions of statistics functions and classes. More...

#include <cmath>
#include <itpp/base/vec.h>
#include <itpp/base/mat.h>
#include <itpp/base/elmatfunc.h>
#include <itpp/base/matfunc.h>

Go to the source code of this file.

Namespaces

namespace  itpp

Classes

class  itpp::Stat
 A class for sampling a signal and calculating statistics. More...

Functions

template<class T>
itpp::max (const Vec< T > &v)
 Maximum value of vector.
template<class T>
itpp::max (const Vec< T > &v, int &index)
 Maximum value of vector, also returns the index position of max value.
template<class T>
Vec< T > itpp::max (const Mat< T > &m, int dim=1)
template<class T>
Vec< T > itpp::max (const Mat< T > &m, ivec &index, int dim=1)
template<class T>
itpp::min (const Vec< T > &in)
 Minimum value of vector.
template<class T>
itpp::min (const Vec< T > &in, int &index)
 Minimum value of vector, also returns the index position of min value.
template<class T>
Vec< T > itpp::min (const Mat< T > &m, int dim=1)
template<class T>
Vec< T > itpp::min (const Mat< T > &m, ivec &index, int dim=1)
template<class T>
int itpp::max_index (const Vec< T > &in)
 Return the postion of the maximum element in the vector.
template<class T>
void itpp::max_index (const Mat< T > &m, int &row, int &col)
 Return the postion of the maximum element in the matrix.
template<class T>
int itpp::min_index (const Vec< T > &in)
 Return the postion of the minimum element in the vector.
template<class T>
void itpp::min_index (const Mat< T > &m, int &row, int &col)
 Return the postion of the minimum element in the matrix.
double itpp::mean (const vec &v)
 The mean value.
std::complex< double > itpp::mean (const cvec &v)
 The mean value.
double itpp::mean (const svec &v)
 The mean value.
double itpp::mean (const ivec &v)
 The mean value.
double itpp::mean (const mat &m)
 The mean value.
std::complex< double > itpp::mean (const cmat &m)
 The mean value.
double itpp::mean (const smat &m)
 The mean value.
double itpp::mean (const imat &m)
template<class T>
double itpp::geometric_mean (const Vec< T > &v)
 The geometric mean value.
template<class T>
double itpp::median (const Vec< T > &v)
 The median.
double itpp::norm (const cvec &v)
 Calculate the 2-norm: norm(v)=sqrt(sum(abs(v).^2)).
template<class T>
double itpp::norm (const Vec< T > &v)
 Calculate the 2-norm: norm(v)=sqrt(sum(abs(v).^2)).
double itpp::norm (const cvec &v, int p)
 Calculate the p-norm: norm(v,p)=sum(abs(v).^2)^(1/p).
template<class T>
double itpp::norm (const Vec< T > &v, int p)
 Calculate the p-norm: norm(v,p)=sum(abs(v).^2)^(1/p).
double itpp::norm (const cvec &v, const std::string &s)
 Calculate the frobeniuos norm for s = "fro" (equal to 2-norm).
template<class T>
double itpp::norm (const Vec< T > &v, const std::string &s)
 Calculate the frobeniuos norm for s = "fro" (equal to 2-norm).
double itpp::norm (const mat &m, int p)
double itpp::norm (const cmat &m, int p)
double itpp::norm (const mat &m, const std::string &s)
 Calculate the frobeniuos norm of a matrix for s = "fro".
double itpp::norm (const cmat &m, const std::string &s)
 Calculate the frobeniuos norm of a matrix for s = "fro".
double itpp::variance (const cvec &v)
 The variance of the elements in the vector. Normalized with N-1 to be unbiased.
template<class T>
double itpp::variance (const Vec< T > &v)
 The variance of the elements in the vector. Normalized with N-1 to be unbiased.
template<class T>
double itpp::energy (const Vec< T > &v)
 Calculate the energy: squared 2-norm. energy(v)=sum(abs(v).^2).
bool itpp::within_tolerance (double x, double xref, double tol=1e-14)
 Return true if the input value x is within the tolerance tol of the reference value xref.
bool itpp::within_tolerance (std::complex< double > x, std::complex< double > xref, double tol=1e-14)
 Return true if the input value x is within the tolerance tol of the reference value xref.
bool itpp::within_tolerance (const vec &x, const vec &xref, double tol=1e-14)
 Return true if the input vector x is elementwise within the tolerance tol of the reference vector xref.
bool itpp::within_tolerance (const cvec &x, const cvec &xref, double tol=1e-14)
 Return true if the input vector x is elementwise within the tolerance tol of the reference vector xref.
bool itpp::within_tolerance (const mat &X, const mat &Xref, double tol=1e-14)
 Return true if the input matrix X is elementwise within the tolerance tol of the reference matrix Xref.
bool itpp::within_tolerance (const cmat &X, const cmat &Xref, double tol=1e-14)
 Return true if the input matrix X is elementwise within the tolerance tol of the reference matrix Xref.
double itpp::moment (const vec &x, const int r)
 Calculate the central moment of vector x.
double itpp::skewness (const vec &x)
 Calculate the skewness excess of the input vector x.
double itpp::kurtosisexcess (const vec &x)
 Calculate the kurtosis excess of the input vector x.
double itpp::kurtosis (const vec &x)
 Calculate the kurtosis of the input vector x.


Detailed Description

Definitions of statistics functions and classes.

Author:
Tony Ottosson, Johan Bergman and Adam Piatyszek
$Date$ $Revision$

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

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

Copyright (C) 1995-2007 (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 stat.h.

SourceForge Logo

Generated on Thu Aug 30 02:47:21 2007 for IT++ by Doxygen 1.5.3