|
| template<typename T, int N> |
| FMatrix< T, N, N > | Imagine::cholesky (const FMatrix< T, N, N > &A, bool low=true) |
| | Cholesky decomposition.
|
| |
| template<typename T, int N> |
| T | Imagine::detFMatrix (const FMatrix< T, N, N > &A) |
| | Determinant.
|
| |
| template<typename T> |
| Matrix< T > | Imagine::Diagonal (const Vector< T > &d) |
| | Diagonal.
|
| |
| template<typename T> |
| void | Imagine::eigenvalues (const Matrix< T > &A, Vector< T > &wr, Vector< T > &wi) |
| | Eigenvalues calculation Given square matrix, only eigenvalues are obtained.
|
| |
| template<typename T, int N> |
| FMatrix< T, N, N > | Imagine::inverseFMatrix (const FMatrix< T, N, N > &A) |
| | Inverse.
|
| |
| template<typename T, int M, int N> |
| FVector< T, N > | Imagine::linSolve (const FMatrix< T, M, N > &A, const FVector< T, M > &b) |
| | Linear system.
|
| |
| template<typename T> |
| Matrix< T > | Imagine::outerProduct (const Vector< T > &v1, const Vector< T > &v2) |
| | Outer product matrix.
|
| |
| template<typename T, int M, int N> |
| FMatrix< T, N, M > | Imagine::pseudoInverse (const FMatrix< T, M, N > &A, T tolrel=0) |
| | Pseudo inverse.
|
| |
| template<typename T, int M, int N> |
| bool | Imagine::QR (const FMatrix< T, M, N > &A, FMatrix< T, M, N > &Q, FMatrix< T, N, N > &R) |
| | QR decomposition.
|
| |
| template<typename T, int M, int N> |
| bool | Imagine::QRAll (const FMatrix< T, M, N > &A, FMatrix< T, M, M > &Q, FMatrix< T, M, N > &R) |
| | QR decomposition.
|
| |
| template<typename T, int M, int N> |
| void | Imagine::svd (const FMatrix< T, M, N > &A, FMatrix< T, M, M > &U, FVector< T, M > &S, FMatrix< T, N, N > &Vt, bool all=false) |
| | SVD.
|
| |
template<typename T, int M, int N>
| void Imagine::svd |
( |
const FMatrix< T, M, N > & | A, |
|
|
FMatrix< T, M, M > & | U, |
|
|
FVector< T, M > & | S, |
|
|
FMatrix< T, N, N > & | Vt, |
|
|
bool | all = false ) |
Singular value decomposition. A is MxN. S is of size M with decreasing singular values (only min(M,N) first coefficients are filled). A=U*diag(S)*Vt where U (resp. Vt) is MxM (resp NxN) orthonormal, diag(S) is MxN with S as diagonal. If M<N (resp. M>N) then Vt (resp. U) is incompletely filled, except if all is true.
- Parameters
-
| A | matrix |
| U,S,Vt | SVD output |
| all | completely fill U and V, even columns multiplied by zero |
cout << "SVD check 1: "
for(int i=0; i < 3; i++)
S2(i,i) = S[i];
cout << "SVD check 2: "
<< norm(A-U*S2*Vt2) << endl;
cout << "SVD check 3: "
static FMatrix Identity()
Identity.
Definition FMatrix.h:197
void svd(const FMatrix< T, M, N > &A, FMatrix< T, M, M > &U, FVector< T, M > &S, FMatrix< T, N, N > &Vt, bool all=false)
SVD.
Definition Matrix.h:886
See equivalent function for Matrix.