|
CEDRIC
Revision_backup-2009-02
|
Some utility function for vector and matrix calculation. More...
Functions | |
| template<class ValueType > | |
| bool | affine_fit (const ublas::matrix< ValueType > &q_, const ublas::matrix< ValueType > &p, ublas::matrix< ValueType > &A, ublas::vector< ValueType > &b) |
Fit affine transformation such that . More... | |
| template<class ValueType > | |
| ublas::vector< ValueType > | column_means (ublas::matrix< ValueType > &A) |
| Calculate column means of a matrix. More... | |
| template<class ValueType > | |
| ublas::vector< ValueType > | row_means (ublas::matrix< ValueType > &A) |
| Calculate row means of a matrix. More... | |
| template<class ValueType > | |
| ValueType | grand_mean (const ublas::matrix< ValueType > &A) |
| Calculate grand means of a matrix. More... | |
| template<class ValueType > | |
| void | double_center (ublas::matrix< ValueType > &D) |
| Double center matrix, i.e. substract column and row means and add in grand mean. More... | |
| template<class ValueType > | |
| void | zero_eps (ublas::matrix< ValueType > &A, ValueType eps=1e-7) |
| Eliminate all matrix entries smaller than some epsilon. More... | |
| template<class ValueType > | |
| void | zero_eps (ublas::vector< ValueType > &v, ValueType eps=1e-7) |
| Eliminate all vector entries smaller than some epsilon. More... | |
Some utility function for vector and matrix calculation.
| bool ublasTools::affine_fit | ( | const ublas::matrix< ValueType > & | q_, |
| const ublas::matrix< ValueType > & | p, | ||
| ublas::matrix< ValueType > & | A, | ||
| ublas::vector< ValueType > & | b | ||
| ) |
Fit affine transformation such that
.
| q | Matrix containing points of dimension | |
| p | Matrix containing points of dimension | |
| [out] | Matrix | A |
| [out] | Vector | b |
Implemented after Helmut Spaeth's paper "Fitting affine and orthogonal transformations between two set of points".
| ublas::vector<ValueType> ublasTools::column_means | ( | ublas::matrix< ValueType > & | A | ) |
Calculate column means of a matrix.
| [in] | A | matrix (also it is not const, A isn't changed!) |
Referenced by double_center().
| void ublasTools::double_center | ( | ublas::matrix< ValueType > & | D | ) |
Double center matrix, i.e. substract column and row means and add in grand mean.
| [in,out] | D | matrix, overwritten by double-centered matrix |
References column_means(), grand_mean(), and row_means().
Referenced by CMDS< ValueType >::CMDS().
| ValueType ublasTools::grand_mean | ( | const ublas::matrix< ValueType > & | A | ) |
Calculate grand means of a matrix.
| [in] | A | matrix (also it is not const, A isn't changed!) |
divided by
Referenced by double_center().
| ublas::vector<ValueType> ublasTools::row_means | ( | ublas::matrix< ValueType > & | A | ) |
Calculate row means of a matrix.
| [in] | A | matrix (also it is not const, A isn't changed!) |
Referenced by double_center().
| void ublasTools::zero_eps | ( | ublas::matrix< ValueType > & | A, |
| ValueType | eps = 1e-7 |
||
| ) |
Eliminate all matrix entries smaller than some epsilon.
| void ublasTools::zero_eps | ( | ublas::vector< ValueType > & | v, |
| ValueType | eps = 1e-7 |
||
| ) |
Eliminate all vector entries smaller than some epsilon.
1.8.6