Image Component Library (ICL)
Namespaces | Functions
DynMatrixUtils.h File Reference
#include <ICLUtils/CompatMacros.h>
#include <ICLMath/DynMatrix.h>
#include <ICLUtils/BasicTypes.h>
#include <algorithm>

Go to the source code of this file.

Namespaces

 icl
 undocument this line if you encounter any issues!
 
 icl::math
 

Functions

template<class T , class Init >
DynMatrix< T > & icl::math::matrix_init (DynMatrix< T > &m, Init init)
 Matrix initialization template. More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_abs (DynMatrix< T > &m)
 element-wise absolute value (inplace) [IPP-optimized] More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_abs (const DynMatrix< T > &m, DynMatrix< T > &dst)
 element-wise absolute value [IPP-optimized] More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_log (DynMatrix< T > &m)
 element-wise logarith (basis E) (inplace) [IPP-optimized] More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_log (const DynMatrix< T > &m, DynMatrix< T > &dst)
 element-wise logarith (basis E) [IPP-optimized] More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_exp (DynMatrix< T > &m)
 element-wise exp-function (inplace) [IPP-optimized] More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_exp (const DynMatrix< T > &m, DynMatrix< T > &dst)
 element-wise exp-function [IPP-optimized] More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_sqrt (DynMatrix< T > &m)
 element-wise square-root-function (inplace) [IPP-optimized] More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_sqrt (const DynMatrix< T > &m, DynMatrix< T > &dst)
 element-wise square-root-function [IPP-optimized] More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_sqr (DynMatrix< T > &m)
 element-wise square-function (x*x) (inplace) [IPP-optimized] More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_sqr (const DynMatrix< T > &m, DynMatrix< T > &dst)
 element-wise square-function (x*x) [IPP-optimized] More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_sin (DynMatrix< T > &m)
 element-wise sinus-function (x*x) (inplace) More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_sin (const DynMatrix< T > &m, DynMatrix< T > &dst)
 element-wise sinus-function (x*x) More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_cos (DynMatrix< T > &m)
 element-wise cosinus-function (inplace) More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_cos (const DynMatrix< T > &m, DynMatrix< T > &dst)
 element-wise cosinus-function More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_tan (DynMatrix< T > &m)
 element-wise tangent-function (inplace) More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_tan (const DynMatrix< T > &m, DynMatrix< T > &dst)
 element-wise tangent-function More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_arcsin (DynMatrix< T > &m)
 element-wise arcus sinus-function (inplace) More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_arcsin (const DynMatrix< T > &m, DynMatrix< T > &dst)
 element-wise arcus sinus-function More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_arccos (DynMatrix< T > &m)
 element-wise arcus cosinus-function (inplace) More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_arccos (const DynMatrix< T > &m, DynMatrix< T > &dst)
 element-wise arcus cosinus-function More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_arctan (DynMatrix< T > &m)
 element-wise arcus tangent-function (inplace) More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_arctan (const DynMatrix< T > &m, DynMatrix< T > &dst)
 element-wise arcus tangent-function More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_reciprocal (DynMatrix< T > &m)
 element-wise reciprocal-function (1/x) (inplace) More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_reciprocal (const DynMatrix< T > &m, DynMatrix< T > &dst)
 element-wise reciprocal-function (1/x) More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_powc (DynMatrix< T > &m, T exponent)
 element-wise power-function (x^exponent) (inplace) More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_powc (const DynMatrix< T > &m, T exponent, DynMatrix< T > &dst)
 element-wise power-function (x^exponent) More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_addc (DynMatrix< T > &m, T val)
 element-wise addition of constant value (inplace) [IPP-optimized] More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_addc (const DynMatrix< T > &m, T val, DynMatrix< T > &dst)
 element-wise addition of constant value [IPP-optimized] More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_subc (DynMatrix< T > &m, T val)
 element-wise substraction of constant value (inplace) [IPP-optimized] More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_subc (const DynMatrix< T > &m, T val, DynMatrix< T > &dst)
 element-wise substraction of constant value [IPP-optimized] More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_divc (DynMatrix< T > &m, T val)
 element-wise division by constant value (inplace) [IPP-optimized] More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_divc (const DynMatrix< T > &m, T val, DynMatrix< T > &dst)
 element-wise division by constant value [IPP-optimized] More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_mulc (DynMatrix< T > &m, T val)
 element-wise multiplication with constant value (inplace) [IPP-optimized] More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_mulc (const DynMatrix< T > &m, T val, DynMatrix< T > &dst)
 element-wise multiplication with constant value [IPP-optimized] More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_arctan2 (const DynMatrix< T > &my, const DynMatrix< T > &mx, DynMatrix< T > &dst)
 element-wise atan2 function atan2(y,x) More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_add (const DynMatrix< T > &m1, const DynMatrix< T > &m2, DynMatrix< T > &dst)
 element-wise addition [IPP-optimized] More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_sub (const DynMatrix< T > &m1, const DynMatrix< T > &m2, DynMatrix< T > &dst)
 element-wise substraction [IPP-optimized] More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_mul (const DynMatrix< T > &m1, const DynMatrix< T > &m2, DynMatrix< T > &dst)
 element-wise multiplication [IPP-optimized] More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_div (const DynMatrix< T > &m1, const DynMatrix< T > &m2, DynMatrix< T > &dst)
 element-wise division [IPP-optimized] More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_pow (const DynMatrix< T > &m1, const DynMatrix< T > &m2, DynMatrix< T > &dst)
 element-wise power More...
 
template<class T >
ICLMath_IMP void icl::math::svd_dyn (const DynMatrix< T > &A, DynMatrix< T > &U, DynMatrix< T > &S, DynMatrix< T > &V)
 SVD function - decomposes A into USV' (only icl32f and icl64f) More...
 

matrix distance measurement

template<class T >
ICLMath_IMPicl::math::matrix_distance (const DynMatrix< T > &m1, const DynMatrix< T > &m2, T norm=2)
 computes norm between matrix vectors More...
 
template<class T >
ICLMath_IMPicl::math::matrix_divergence (const DynMatrix< T > &m1, const DynMatrix< T > &m2)
 computes generalized Kullback-Leibler-divergence between matrix vectors More...
 

statistical functions

template<class T >
ICLMath_IMPicl::math::matrix_min (const DynMatrix< T > &m, int *x=0, int *y=0)
 find minimum element of matrix (optionally find location too) [IPP-optimized] More...
 
template<class T >
ICLMath_IMPicl::math::matrix_max (const DynMatrix< T > &m, int *x=0, int *y=0)
 find maximum element of matrix (optionally find location too) [IPP-optimized] More...
 
template<class T >
ICLMath_IMP void icl::math::matrix_minmax (const DynMatrix< T > &m, T dst[2], int *minx=0, int *miny=0, int *maxx=0, int *maxy=0)
 find min- and maxinim element at once (optionally with locations) [IPP-optimized] More...
 
template<class T >
ICLMath_IMPicl::math::matrix_mean (const DynMatrix< T > &m)
 calculate matrix mean value [IPP-optimized] More...
 
template<class T >
ICLMath_IMPicl::math::matrix_var (const DynMatrix< T > &m)
 calculate matrix variance [IPP-optimized] More...
 
template<class T >
ICLMath_IMPicl::math::matrix_var (const DynMatrix< T > &m, T mean, bool empiricalMean=true)
 calculate matrix variance with given mean More...
 
template<class T >
ICLMath_IMP void icl::math::matrix_meanvar (const DynMatrix< T > &m, T *mean, T *var)
 computes matrix mean and variance at once [IPP-optimized] More...
 
template<class T >
ICLMath_IMPicl::math::matrix_stddev (const DynMatrix< T > &m)
 computes matrix standard deviation (sqrt(var)) [IPP-optimized] More...
 
template<class T >
ICLMath_IMPicl::math::matrix_stddev (const DynMatrix< T > &m, T mean, bool empiricalMean=true)
 calculate matrix standard deviation with given mean More...
 

other functions ...

template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_muladd (const DynMatrix< T > &a, T alpha, const DynMatrix< T > &b, T beta, T gamma, DynMatrix< T > &dst)
 computes alpha*a + beta*b + gamma More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_muladd (const DynMatrix< T > &a, T alpha, T gamma, DynMatrix< T > &dst)
 computes alpha*a + gamma More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_mask (const DynMatrix< unsigned char > &mask, DynMatrix< T > &m)
 applies masking operation (m(i,j) is set to 0 if mask(i,j) is 0) (inplace) More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_mask (const DynMatrix< unsigned char > &mask, const DynMatrix< T > &m, DynMatrix< T > &dst)
 applies masking operation (m(i,j) is set to 0 if mask(i,j) is 0) More...
 

special functions for transposed matrices ...

enum  icl::math::transposedDef { icl::math::NONE_T =0, icl::math::SRC1_T =1<<0, icl::math::SRC2_T =1<<1, icl::math::BOTH_T =SRC1_T | SRC2_T }
 special utility type for definition of transposed states for matrices More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_mult_t (const DynMatrix< T > &src1, const DynMatrix< T > &src2, DynMatrix< T > &dst, int transpDef)
 applies matrix mutliplication on optionally transposed matrices More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::big_matrix_mult_t (const DynMatrix< T > &src1, const DynMatrix< T > &src2, DynMatrix< T > &dst, int transpDef)
 applies matrix mutliplication on optionally transposed matrices (specialized for big matrices) More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_add_t (const DynMatrix< T > &src1, const DynMatrix< T > &src2, DynMatrix< T > &dst, int transpDef)
 applies matrix addition on optionally transposed matrices More...
 
template<class T >
ICLMath_IMP DynMatrix< T > & icl::math::matrix_sub_t (const DynMatrix< T > &src1, const DynMatrix< T > &src2, DynMatrix< T > &dst, int transpDef)
 applies matrix substraction on optionally transposed matrices More...