Data Structures | |
| struct | mirml_nr_svd_t_ |
| Structure for Singular Value Decomposition (SVD) of matrices: A=U*W*V^T. More... | |
Typedefs | |
| typedef struct mirml_nr_svd_t_ | mirml_nr_svd_t |
| Structure for Singular Value Decomposition (SVD) of matrices: A=U*W*V^T. | |
Functions | |
| mirkl_error_t * | mirml_nr_svd_init (mirml_nr_svd_t **svd) |
| Allocation and initialization of SVD structure. | |
| mirkl_error_t * | mirml_nr_svd_decompose (mirml_matrix_t *a, mirkl_size_t i0, mirkl_size_t j0, mirkl_size_t cm, mirkl_size_t cn, mirml_nr_svd_t *svd) |
| SVD decomposition. | |
| mirkl_error_t * | mirml_nr_svd_reorder (mirml_nr_svd_t *svd) |
| Sorting of singular values and matrices U and V after succesful mirml_nr_svd_decompose. | |
| void | mirml_nr_svd_free (mirml_nr_svd_t *svd) |
| Deallocates SVD structure and its content. | |
| mirkl_error_t * | mirml_nr_svd_invert (mirml_nr_svd_t *svd, mirml_matrix_t **out_m) |
| Calculation of inverted matrix with help of SVD decomposition. | |
| mirkl_error_t * | mirml_nr_svd_vsolve (mirml_nr_svd_t *svd, mirml_vector_t *b, mirml_vector_t **x) |
| Solves A*x=b for a vector x using the pseudoinverse of A as obtained by SVD. | |
| mirkl_error_t * | mirml_nr_svd_msolve (mirml_nr_svd_t *svd, mirml_matrix_t *b, mirml_matrix_t **x) |
| Solves m sets of n equations A*X=B using the pseudoinverse of A. | |
| mirkl_error_t * | mirml_nr_svd_range (mirml_nr_svd_t *svd, mirml_matrix_t **rnge) |
| Give an orthonormal basis for the range of SVD'ed matrix as the columns of a returned matrix. | |
| mirkl_error_t * | mirml_nr_svd_nullspace (mirml_nr_svd_t *svd, mirml_matrix_t **nullsp) |
| Give an orthonormal basis for the nullspace of SVD'ed matrix as the columns of a returned matrix. | |
| mirkl_error_t * mirml_nr_svd_decompose | ( | mirml_matrix_t * | a, |
| mirkl_size_t | i0, | ||
| mirkl_size_t | j0, | ||
| mirkl_size_t | cm, | ||
| mirkl_size_t | cn, | ||
| mirml_nr_svd_t * | svd | ||
| ) |
SVD decomposition.
| [in] | a | Matrix to be decomposed. |
| [in] | i0 | Starting row index, from which the input matrix should be processed. |
| [in] | j0 | Starting column index, from which the input matrix should be processed. |
| [in] | cm | Custom number of rows in input matrix to be processed. All rows of input matrix starting from index i0 will be processed if cm is 0. |
| [in] | cn | Custom number of columns in input matrix to be processed. All columns of input matrix starting from index j0 will be processed if cn is 0. |
| [in,out] | svd | Preallocated and initialized structure with results of SVD decomposition on output. |
| void mirml_nr_svd_free | ( | mirml_nr_svd_t * | svd | ) |
Deallocates SVD structure and its content.
| mirkl_error_t * mirml_nr_svd_invert | ( | mirml_nr_svd_t * | svd, |
| mirml_matrix_t ** | out_m | ||
| ) |
Calculation of inverted matrix with help of SVD decomposition.
| [in] | svd | Structure of SVD. |
| [in,out] | out_m | Inverted matrix on output. Can be preallocated, otherwise it is allocated inside the function. |
| mirkl_error_t * mirml_nr_svd_msolve | ( | mirml_nr_svd_t * | svd, |
| mirml_matrix_t * | b, | ||
| mirml_matrix_t ** | x | ||
| ) |
Solves m sets of n equations A*X=B using the pseudoinverse of A.
| [in] | svd | Structure of SVD. |
| [in] | b | right-hand sides as b[0..n-1][0..m-1]. |
| [in,out] | x | Returned solutions as x[0..n-1][0..m-1]. This matrix can be preallocated, otherwise it is allocated inside the function. |
| mirkl_error_t * mirml_nr_svd_nullspace | ( | mirml_nr_svd_t * | svd, |
| mirml_matrix_t ** | nullsp | ||
| ) |
Give an orthonormal basis for the nullspace of SVD'ed matrix as the columns of a returned matrix.
| [in] | svd | Structure of SVD. |
| [in,out] | nullsp | Returned range matrix. It can be preallocated, otherwise it is allocated inside the function. |
| mirkl_error_t * mirml_nr_svd_range | ( | mirml_nr_svd_t * | svd, |
| mirml_matrix_t ** | rnge | ||
| ) |
Give an orthonormal basis for the range of SVD'ed matrix as the columns of a returned matrix.
| [in] | svd | Structure of SVD. |
| [in,out] | rnge | Returned range matrix. It can be preallocated, otherwise it is allocated inside the function. |
| mirkl_error_t * mirml_nr_svd_vsolve | ( | mirml_nr_svd_t * | svd, |
| mirml_vector_t * | b, | ||
| mirml_vector_t ** | x | ||
| ) |
Solves A*x=b for a vector x using the pseudoinverse of A as obtained by SVD.
| [in] | svd | Structure of SVD. |
| [in] | b | Right-hand-side vector. |
| [in,out] | x | Left-hand-side vector of unknowns to be determined. Can be preallocated, otherwise it is allocated inside the function. |