Math

Classes

class  vcg::ndim::Matrix< TYPE >
class  vcg::ndim::MatrixDiag< N, S >
class  vcg::ndim::MatrixDiagBase

Typedefs

typedef vcg::ndim::Matrix< double > vcg::ndim::MatrixMNd
typedef vcg::ndim::Matrix< float > vcg::ndim::MatrixMNf

Enumerations

enum  vcg::SortingStrategy { vcg::LeaveUnsorted = 0, vcg::SortAscending = 1, vcg::SortDescending = 2 }

Functions

template<typename MATRIX_TYPE , typename POINT_TYPE >
static void vcg::Jacobi (MATRIX_TYPE &w, POINT_TYPE &d, MATRIX_TYPE &v, int &nrot)
template<typename MATRIX_TYPE >
static void vcg::JacobiRotate (MATRIX_TYPE &A, typename MATRIX_TYPE::ScalarType s, typename MATRIX_TYPE::ScalarType tau, int i, int j, int k, int l)
template<typename TYPE >
static TYPE vcg::pythagora (TYPE a, TYPE b)
template<class S >
void vcg::RotationalPartByPolarDecomposition (const vcg::Matrix33< S > &m, vcg::Matrix33< S > &r)
template<typename TYPE >
static TYPE vcg::sign (TYPE a, TYPE b)
template<typename MATRIX_TYPE >
static void vcg::SingularValueBacksubstitution (const MATRIX_TYPE &U, const typename MATRIX_TYPE::ScalarType *W, const MATRIX_TYPE &V, typename MATRIX_TYPE::ScalarType *x, const typename MATRIX_TYPE::ScalarType *b)
template<typename MATRIX_TYPE >
static bool vcg::SingularValueDecomposition (MATRIX_TYPE &A, typename MATRIX_TYPE::ScalarType *W, MATRIX_TYPE &V, const SortingStrategy sorting=LeaveUnsorted, const int max_iters=30)
template<typename MATRIX_TYPE >
void vcg::Sort (MATRIX_TYPE &U, typename MATRIX_TYPE::ScalarType W[], MATRIX_TYPE &V, const SortingStrategy sorting)
template<typename MATRIX_TYPE , typename POINT_TYPE >
void vcg::SortEigenvaluesAndEigenvectors (POINT_TYPE &eigenvalues, MATRIX_TYPE &eigenvectors, bool absComparison=false)
template<typename TYPE >
static TYPE vcg::sqr (TYPE a)

Detailed Description


Typedef Documentation

Definition at line 759 of file deprecated_matrix.h.

Definition at line 760 of file deprecated_matrix.h.


Enumeration Type Documentation

Enumerator:
LeaveUnsorted 
SortAscending 
SortDescending 

Definition at line 249 of file lin_algebra.h.


Function Documentation

template<typename MATRIX_TYPE , typename POINT_TYPE >
static void vcg::Jacobi ( MATRIX_TYPE &  w,
POINT_TYPE &  d,
MATRIX_TYPE &  v,
int &  nrot 
) [inline, static]

Computes all eigenvalues and eigenvectors of a real symmetric matrix . On output, elements of the input matrix above the diagonal are destroyed.

Parameters:
d returns the eigenvalues of a.
v is a matrix whose columns contain, the normalized eigenvectors
nrot returns the number of Jacobi rotations that were required.

Definition at line 81 of file lin_algebra.h.

template<typename MATRIX_TYPE >
static void vcg::JacobiRotate ( MATRIX_TYPE &  A,
typename MATRIX_TYPE::ScalarType  s,
typename MATRIX_TYPE::ScalarType  tau,
int  i,
int  j,
int  k,
int  l 
) [inline, static]

Definition at line 65 of file lin_algebra.h.

template<typename TYPE >
static TYPE vcg::pythagora ( TYPE  a,
TYPE  b 
) [inline, static]

Definition at line 223 of file lin_algebra.h.

template<class S >
void vcg::RotationalPartByPolarDecomposition ( const vcg::Matrix33< S > &  m,
vcg::Matrix33< S > &  r 
) [inline]

Extract the rotational part of a matrix by polar decomposition m = R*S. Polar decomposition is computed by taking r = m * sqrt(m^t*m)^{-1}

Definition at line 45 of file polar_decomposition.h.

template<typename TYPE >
static TYPE vcg::sign ( TYPE  a,
TYPE  b 
) [inline, static]

Definition at line 234 of file lin_algebra.h.

template<typename MATRIX_TYPE >
static void vcg::SingularValueBacksubstitution ( const MATRIX_TYPE &  U,
const typename MATRIX_TYPE::ScalarType W,
const MATRIX_TYPE &  V,
typename MATRIX_TYPE::ScalarType x,
const typename MATRIX_TYPE::ScalarType b 
) [inline, static]

Solves AxX = B for a vector X, where A is specified by the matrices Umxn, Wnx1 and Vnxn as returned by SingularValueDecomposition. No input quantities are destroyed, so the routine may be called sequentially with different bxs.

Parameters:
x is the output solution vector (xnx1)
b is the input right-hand side (bnx1)

Definition at line 622 of file lin_algebra.h.

template<typename MATRIX_TYPE >
static bool vcg::SingularValueDecomposition ( MATRIX_TYPE &  A,
typename MATRIX_TYPE::ScalarType W,
MATRIX_TYPE &  V,
const SortingStrategy  sorting = LeaveUnsorted,
const int  max_iters = 30 
) [inline, static]

Given a matrix Amxn, this routine computes its singular value decomposition, i.e. A=UxWxVT. The matrix A will be destroyed! (This is the implementation described in Numerical Recipies).

Parameters:
A the matrix to be decomposed
W the diagonal matrix of singular values W, stored as a vector W[1...N]
V the matrix V (not the transpose VT)
max_iters max iteration number (default = 30).
Returns:

Definition at line 265 of file lin_algebra.h.

template<typename MATRIX_TYPE >
void vcg::Sort ( MATRIX_TYPE &  U,
typename MATRIX_TYPE::ScalarType  W[],
MATRIX_TYPE &  V,
const SortingStrategy  sorting 
) [inline]

Sort the singular values computed by the SingularValueDecomposition procedure and modify the matrices U and V accordingly.

Definition at line 522 of file lin_algebra.h.

template<typename MATRIX_TYPE , typename POINT_TYPE >
void vcg::SortEigenvaluesAndEigenvectors ( POINT_TYPE &  eigenvalues,
MATRIX_TYPE &  eigenvectors,
bool  absComparison = false 
) [inline]

Given the eigenvectors and the eigenvalues as output from JacobiRotate, sorts the eigenvalues into descending order, and rearranges the columns of v correspondinlgy.

Parameters:
eigenvalues 
eigenvector (in columns)
absComparison sort according to the absolute values of the eigenvalues.

Definition at line 178 of file lin_algebra.h.

template<typename TYPE >
static TYPE vcg::sqr ( TYPE  a  )  [inline, static]

Definition at line 240 of file lin_algebra.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


vcglib
Author(s): Christian Bersch
autogenerated on Fri Jan 11 09:21:30 2013