|
int | linearIndex (const int irow, const int jcol, const int M, const int N) |
| Get the index in the linearized matrix of size MxN. More...
|
|
bool | computeSVD (std::vector< double > &a_linU, std::vector< double > &a_linSigma, std::vector< double > &a_linVtran, const std::vector< double > &a_linA, const int &a_M, const int &a_N) |
| Compute the singular value decomposition of a matrix. More...
|
|
bool | computeSVD (std::vector< float > &a_linU, std::vector< float > &a_linSigma, std::vector< float > &a_linVtran, const std::vector< float > &a_linA, const int &a_M, const int &a_N) |
| Compute the singular value decomposition of a matrix. More...
|
|
bool | computePseudoInverse (std::vector< double > &a_linAplus, const std::vector< double > &a_linA, const int &a_M, const int &a_N) |
| Compute the pseudoinverse of matrix through singular value decomposition. More...
|
|
bool | computePseudoInverse (std::vector< float > &a_linAplus, const std::vector< float > &a_linA, const int &a_M, const int &a_N) |
| Compute the pseudoinverse of matrix through singular value decomposition. More...
|
|
void | linearizeMatrix (std::vector< double > &a_linA, int &a_M, int &a_N, const std::vector< std::vector< double >> &a_A, const char &a_format) |
| Linearize a matrix to column major Fortran form by assuming row or major colum format of the input matrix. More...
|
|
void | linearizeColumnMajorMatrix (std::vector< double > &a_linA, int &a_M, int &a_N, const std::vector< std::vector< double >> &a_A) |
| Linearize a matrix to column major Fortran form by column major format of the input matrix. More...
|
|
void | linearizeRowMajorMatrix (std::vector< double > &a_linA, int &a_M, int &a_N, const std::vector< std::vector< double >> &a_A) |
| Linearize a matrix to column major Fortran form by row major format of the input matrix. More...
|
|
void | deLinearizeMatrix (std::vector< std::vector< double >> &a_A, const int &a_M, const int &a_N, const std::vector< double > &a_linA, const char &a_format) |
| Delinearize a linearized matrix from column major Fortran to row or major colum matrix format. More...
|
|
void | deLinearizeColumnMajorMatrix (std::vector< std::vector< double >> &a_A, const int &a_M, const int &a_N, const std::vector< double > &a_linA) |
| Delinearize a linearized matrix from column major Fortran to column major form. More...
|
|
void | deLinearizeRowMajorMatrix (std::vector< std::vector< double >> &a_A, const int &a_M, const int &a_N, const std::vector< double > &a_linA) |
| Delinearize a linearized matrix from column major Fortran to row major form. More...
|
|
Namespace containing various useful linear algebra routines using LaPACK.
bool LaPackUtils::computeSVD |
( |
std::vector< double > & |
a_linU, |
|
|
std::vector< double > & |
a_linSigma, |
|
|
std::vector< double > & |
a_linVtran, |
|
|
const std::vector< double > & |
a_linA, |
|
|
const int & |
a_M, |
|
|
const int & |
a_N |
|
) |
| |
Compute the singular value decomposition of a matrix.
- Parameters
-
[out] | a_linU | \(U\)-matrix. Linearized in column major Fortran order. |
[out] | a_linSigma | \(\Sigma\)-matrix. Linearized in column major Fortran order. |
[out] | a_linVtran | \(V^\intercal\)-matrix. Linearized in column major Fortran order. |
[in] | a_linA | \(A\)-matrix. Stored in column-major Fortran form |
[in] | a_M | Number of rows in A |
[in] | a_N | Number of columns in A |
This routine will compute the singular value decomposition of the input matrix \(A\) in the form
\[ A = U\Sigma V^\intercal. \]
The input and output matrices are assumed to be stored column-major so that a_A[0] is the first column of \(A\).
bool LaPackUtils::computeSVD |
( |
std::vector< float > & |
a_linU, |
|
|
std::vector< float > & |
a_linSigma, |
|
|
std::vector< float > & |
a_linVtran, |
|
|
const std::vector< float > & |
a_linA, |
|
|
const int & |
a_M, |
|
|
const int & |
a_N |
|
) |
| |
Compute the singular value decomposition of a matrix.
- Parameters
-
[out] | a_linU | \(U\)-matrix. Linearized in column major Fortran order. |
[out] | a_linSigma | \(\Sigma\)-matrix. Linearized in column major Fortran order. |
[out] | a_linVtran | \(V^\intercal\)-matrix. Linearized in column major Fortran order. |
[in] | a_linA | \(A\)-matrix. Stored in column-major Fortran form |
[in] | a_M | Number of rows in A |
[in] | a_N | Number of columns in A |
This routine will compute the singular value decomposition of the input matrix \(A\) in the form
\[ A = U\Sigma V^\intercal. \]
The input and output matrices are assumed to be stored column-major so that a_A[0] is the first column of \(A\).