Go to the documentation of this file.
14 EIGEN_LAPACK_FUNC(gesdd,(
char *jobz,
int *
m,
int*
n,
Scalar*
a,
int *
lda,
RealScalar *
s,
Scalar *u,
int *ldu,
Scalar *vt,
int *ldvt,
Scalar* ,
int* lwork,
18 bool query_size = *lwork==-1;
22 if(*jobz!=
'A' && *jobz!=
'S' && *jobz!=
'O' && *jobz!=
'N') *
info = -1;
23 else if(*
m<0) *
info = -2;
24 else if(*
n<0) *
info = -3;
27 else if(*ldu <1 || (*jobz==
'A' && *ldu <*
m)
28 || (*jobz==
'O' && *
m<*
n && *ldu<*
m)) *
info = -8;
29 else if(*ldvt<1 || (*jobz==
'A' && *ldvt<*
n)
30 || (*jobz==
'S' && *ldvt<diag_size)
31 || (*jobz==
'O' && *
m>=*
n && *ldvt<*
n)) *
info = -10;
68 matrix(vt,diag_size,*
n,*ldvt) =
svd.matrixV().adjoint();
70 else if(*jobz==
'O' && *
m>=*
n)
85 EIGEN_LAPACK_FUNC(gesvd,(
char *jobu,
char *jobv,
int *
m,
int*
n,
Scalar*
a,
int *
lda,
RealScalar *
s,
Scalar *u,
int *ldu,
Scalar *vt,
int *ldvt,
Scalar* ,
int* lwork,
89 bool query_size = *lwork==-1;
93 if( *jobu!=
'A' && *jobu!=
'S' && *jobu!=
'O' && *jobu!=
'N') *
info = -1;
94 else if((*jobv!=
'A' && *jobv!=
'S' && *jobv!=
'O' && *jobv!=
'N')
95 || (*jobu==
'O' && *jobv==
'O')) *
info = -2;
96 else if(*
m<0) *
info = -3;
97 else if(*
n<0) *
info = -4;
99 else if(*ldu <1 || ((*jobu==
'A' || *jobu==
'S') && *ldu<*
m)) *
info = -9;
100 else if(*ldvt<1 || (*jobv==
'A' && *ldvt<*
n)
101 || (*jobv==
'S' && *ldvt<diag_size)) *
info = -11;
128 if(*jobu==
'A')
matrix(u,*
m,*
m,*ldu) =
svd.matrixU();
129 else if(*jobu==
'S')
matrix(u,*
m,diag_size,*ldu) =
svd.matrixU();
133 if(*jobv==
'A')
matrix(vt,*
n,*
n,*ldvt) =
svd.matrixV().adjoint();
134 else if(*jobv==
'S')
matrix(vt,diag_size,*
n,*ldvt) =
svd.matrixV().adjoint();
135 else if(*jobv==
'O')
matrix(
a,diag_size,*
n,*
lda) =
svd.matrixV().adjoint();
EIGEN_LAPACK_FUNC(gesdd,(char *jobz, int *m, int *n, Scalar *a, int *lda, RealScalar *s, Scalar *u, int *ldu, Scalar *vt, int *ldvt, Scalar *, int *lwork, EIGEN_LAPACK_ARG_IF_COMPLEX(RealScalar *) int *, int *info))
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Map< Matrix< T, Dynamic, 1 >, 0, InnerStride< Dynamic > > make_vector(T *data, int size, int incr)
cout<< "Here is the matrix m:"<< endl<< m<< endl;JacobiSVD< MatrixXf > svd(m, ComputeThinU|ComputeThinV)
#define EIGEN_LAPACK_ARG_IF_COMPLEX(X)
class Bidiagonal Divide and Conquer SVD
Map< Matrix< T, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > matrix(T *data, int rows, int cols, int stride)
NumTraits< Scalar >::Real RealScalar
Two-sided Jacobi SVD decomposition of a rectangular matrix.
EIGEN_WEAK_LINKING int xerbla_(const char *msg, int *info, int)
The matrix class, also used for vectors and row-vectors.
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:05:15