|
| int | linearIndex (const int irow, const int jcol, const int M, const int N) |
| | Get the index in the linearized matrix of size MxN.
|
| |
| 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.
|
| |
| 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.
|
| |
| 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.
|
| |
| 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.
|
| |
| 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 column format of the input matrix.
|
| |
| 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.
|
| |
| 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.
|
| |
| 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 column matrix format.
|
| |
| 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.
|
| |
| 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.
|
| |
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\).
- Returns
- Computed s v d
| 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\).
- Returns
- Computed s v d