11#ifndef EIGEN_JACOBISVD_H
12#define EIGEN_JACOBISVD_H
19template<
typename MatrixType,
int QRPreconditioner,
32template<
typename MatrixType,
int QRPreconditioner,
int Case>
35 enum {
a = MatrixType::RowsAtCompileTime !=
Dynamic &&
36 MatrixType::ColsAtCompileTime !=
Dynamic &&
37 MatrixType::ColsAtCompileTime <= MatrixType::RowsAtCompileTime,
38 b = MatrixType::RowsAtCompileTime !=
Dynamic &&
39 MatrixType::ColsAtCompileTime !=
Dynamic &&
40 MatrixType::RowsAtCompileTime <= MatrixType::ColsAtCompileTime,
51template<
typename MatrixType,
int QRPreconditioner,
int Case>
64template<
typename MatrixType>
68 typedef typename MatrixType::Scalar
Scalar;
71 RowsAtCompileTime = MatrixType::RowsAtCompileTime,
72 MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime
78 if (
svd.rows() != m_qr.rows() ||
svd.cols() != m_qr.cols())
83 if (
svd.m_computeFullU) m_workspace.resize(
svd.rows());
92 if(
svd.m_computeFullU) m_qr.matrixQ().evalTo(
svd.m_matrixU, m_workspace);
93 if(
svd.computeV())
svd.m_matrixV = m_qr.colsPermutation();
101 WorkspaceType m_workspace;
104template<
typename MatrixType>
108 typedef typename MatrixType::Scalar
Scalar;
111 RowsAtCompileTime = MatrixType::RowsAtCompileTime,
112 ColsAtCompileTime = MatrixType::ColsAtCompileTime,
113 MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,
114 MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime,
115 Options = MatrixType::Options
119 Scalar, ColsAtCompileTime, RowsAtCompileTime, Options, MaxColsAtCompileTime, MaxRowsAtCompileTime
124 if (
svd.cols() != m_qr.rows() ||
svd.rows() != m_qr.cols())
129 m_adjoint.resize(
svd.cols(),
svd.rows());
130 if (
svd.m_computeFullV) m_workspace.resize(
svd.cols());
137 m_adjoint =
matrix.adjoint();
138 m_qr.compute(m_adjoint);
140 if(
svd.m_computeFullV) m_qr.matrixQ().evalTo(
svd.m_matrixV, m_workspace);
141 if(
svd.computeU())
svd.m_matrixU = m_qr.colsPermutation();
149 TransposeTypeWithSameStorageOrder m_adjoint;
155template<
typename MatrixType>
161 if (
svd.rows() != m_qr.rows() ||
svd.cols() != m_qr.cols())
166 if (
svd.m_computeFullU) m_workspace.resize(
svd.rows());
167 else if (
svd.m_computeThinU) m_workspace.resize(
svd.cols());
176 if(
svd.m_computeFullU) m_qr.householderQ().evalTo(
svd.m_matrixU, m_workspace);
177 else if(
svd.m_computeThinU)
180 m_qr.householderQ().applyThisOnTheLeft(
svd.m_matrixU, m_workspace);
182 if(
svd.computeV())
svd.m_matrixV = m_qr.colsPermutation();
194template<
typename MatrixType>
198 typedef typename MatrixType::Scalar
Scalar;
201 RowsAtCompileTime = MatrixType::RowsAtCompileTime,
202 ColsAtCompileTime = MatrixType::ColsAtCompileTime,
203 MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,
204 MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime,
205 Options = MatrixType::Options
209 Scalar, ColsAtCompileTime, RowsAtCompileTime, Options, MaxColsAtCompileTime, MaxRowsAtCompileTime
214 if (
svd.cols() != m_qr.rows() ||
svd.rows() != m_qr.cols())
219 if (
svd.m_computeFullV) m_workspace.resize(
svd.cols());
220 else if (
svd.m_computeThinV) m_workspace.resize(
svd.rows());
221 m_adjoint.resize(
svd.cols(),
svd.rows());
228 m_adjoint =
matrix.adjoint();
229 m_qr.compute(m_adjoint);
232 if(
svd.m_computeFullV) m_qr.householderQ().evalTo(
svd.m_matrixV, m_workspace);
233 else if(
svd.m_computeThinV)
236 m_qr.householderQ().applyThisOnTheLeft(
svd.m_matrixV, m_workspace);
238 if(
svd.computeU())
svd.m_matrixU = m_qr.colsPermutation();
247 TransposeTypeWithSameStorageOrder m_adjoint;
253template<
typename MatrixType>
259 if (
svd.rows() != m_qr.rows() ||
svd.cols() != m_qr.cols())
264 if (
svd.m_computeFullU) m_workspace.resize(
svd.rows());
265 else if (
svd.m_computeThinU) m_workspace.resize(
svd.cols());
274 if(
svd.m_computeFullU) m_qr.householderQ().evalTo(
svd.m_matrixU, m_workspace);
275 else if(
svd.m_computeThinU)
278 m_qr.householderQ().applyThisOnTheLeft(
svd.m_matrixU, m_workspace);
291template<
typename MatrixType>
295 typedef typename MatrixType::Scalar
Scalar;
298 RowsAtCompileTime = MatrixType::RowsAtCompileTime,
299 ColsAtCompileTime = MatrixType::ColsAtCompileTime,
300 MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,
301 MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime,
302 Options = MatrixType::Options
306 Scalar, ColsAtCompileTime, RowsAtCompileTime, Options, MaxColsAtCompileTime, MaxRowsAtCompileTime
311 if (
svd.cols() != m_qr.rows() ||
svd.rows() != m_qr.cols())
316 if (
svd.m_computeFullV) m_workspace.resize(
svd.cols());
317 else if (
svd.m_computeThinV) m_workspace.resize(
svd.rows());
318 m_adjoint.resize(
svd.cols(),
svd.rows());
325 m_adjoint =
matrix.adjoint();
326 m_qr.compute(m_adjoint);
329 if(
svd.m_computeFullV) m_qr.householderQ().evalTo(
svd.m_matrixV, m_workspace);
330 else if(
svd.m_computeThinV)
333 m_qr.householderQ().applyThisOnTheLeft(
svd.m_matrixV, m_workspace);
344 TransposeTypeWithSameStorageOrder m_adjoint;
353template<
typename MatrixType,
int QRPreconditioner>
361template<
typename MatrixType,
int QRPreconditioner>
365 typedef typename MatrixType::Scalar
Scalar;
375 const RealScalar considerAsZero = (std::numeric_limits<RealScalar>::min)();
381 work_matrix.coeffRef(
p,
p) = work_matrix.coeffRef(q,
p) =
Scalar(0);
383 if(
abs(numext::imag(work_matrix.coeff(
p,q)))>considerAsZero)
386 z =
abs(work_matrix.coeff(
p,q)) / work_matrix.coeff(
p,q);
387 work_matrix.row(
p) *= z;
388 if(
svd.computeU())
svd.m_matrixU.col(
p) *=
conj(z);
390 if(
abs(numext::imag(work_matrix.coeff(q,q)))>considerAsZero)
392 z =
abs(work_matrix.coeff(q,q)) / work_matrix.coeff(q,q);
393 work_matrix.row(q) *= z;
394 if(
svd.computeU())
svd.m_matrixU.col(q) *=
conj(z);
401 rot.s() = work_matrix.coeff(q,
p) /
n;
402 work_matrix.applyOnTheLeft(
p,q,
rot);
403 if(
svd.computeU())
svd.m_matrixU.applyOnTheRight(
p,q,
rot.adjoint());
404 if(
abs(numext::imag(work_matrix.coeff(
p,q)))>considerAsZero)
406 z =
abs(work_matrix.coeff(
p,q)) / work_matrix.coeff(
p,q);
407 work_matrix.col(q) *= z;
408 if(
svd.computeV())
svd.m_matrixV.col(q) *= z;
410 if(
abs(numext::imag(work_matrix.coeff(q,q)))>considerAsZero)
412 z =
abs(work_matrix.coeff(q,q)) / work_matrix.coeff(q,q);
413 work_matrix.row(q) *= z;
414 if(
svd.computeU())
svd.m_matrixU.col(q) *=
conj(z);
419 maxDiagEntry = numext::maxi<RealScalar>(maxDiagEntry,numext::maxi<RealScalar>(
abs(work_matrix.coeff(
p,
p)),
abs(work_matrix.coeff(q,q))));
421 RealScalar threshold = numext::maxi<RealScalar>(considerAsZero, precision * maxDiagEntry);
422 return abs(work_matrix.coeff(
p,q))>threshold ||
abs(work_matrix.coeff(q,
p)) > threshold;
426template<
typename _MatrixType,
int QRPreconditioner>
488template<
typename _MatrixType,
int QRPreconditioner>
class JacobiSVD
489 :
public SVDBase<JacobiSVD<_MatrixType,QRPreconditioner> >
495 typedef typename MatrixType::Scalar
Scalar;
534 allocate(
rows,
cols, computationOptions);
604 template<
typename __MatrixType,
int _QRPreconditioner,
bool _IsComplex>
606 template<
typename __MatrixType,
int _QRPreconditioner,
int _Case,
bool _DoAnything>
614template<
typename MatrixType,
int QRPreconditioner>
622 computationOptions == m_computationOptions)
630 m_isInitialized =
false;
631 m_isAllocated =
true;
632 m_computationOptions = computationOptions;
633 m_computeFullU = (computationOptions &
ComputeFullU) != 0;
634 m_computeThinU = (computationOptions &
ComputeThinU) != 0;
635 m_computeFullV = (computationOptions &
ComputeFullV) != 0;
636 m_computeThinV = (computationOptions &
ComputeThinV) != 0;
637 eigen_assert(!(m_computeFullU && m_computeThinU) &&
"JacobiSVD: you can't ask for both full and thin U");
638 eigen_assert(!(m_computeFullV && m_computeThinV) &&
"JacobiSVD: you can't ask for both full and thin V");
640 "JacobiSVD: thin U and V are only available when your matrix has a dynamic number of columns.");
644 "JacobiSVD: can't compute thin U or thin V with the FullPivHouseholderQR preconditioner. "
645 "Use the ColPivHouseholderQR preconditioner instead.");
647 m_diagSize = (std::min)(m_rows, m_cols);
648 m_singularValues.resize(m_diagSize);
650 m_matrixU.resize(m_rows, m_computeFullU ? m_rows
651 : m_computeThinU ? m_diagSize
654 m_matrixV.resize(m_cols, m_computeFullV ? m_cols
655 : m_computeThinV ? m_diagSize
657 m_workMatrix.resize(m_diagSize, m_diagSize);
659 if(m_cols>m_rows) m_qr_precond_morecols.allocate(*
this);
660 if(m_rows>m_cols) m_qr_precond_morerows.allocate(*
this);
661 if(m_rows!=m_cols) m_scaledMatrix.resize(
rows,
cols);
664template<
typename MatrixType,
int QRPreconditioner>
665JacobiSVD<MatrixType, QRPreconditioner>&
669 allocate(
matrix.rows(),
matrix.cols(), computationOptions);
676 const RealScalar considerAsZero = (std::numeric_limits<RealScalar>::min)();
681 m_isInitialized =
true;
692 m_qr_precond_morecols.run(*
this, m_scaledMatrix);
693 m_qr_precond_morerows.run(*
this, m_scaledMatrix);
697 m_workMatrix =
matrix.block(0,0,m_diagSize,m_diagSize) /
scale;
698 if(m_computeFullU) m_matrixU.setIdentity(m_rows,m_rows);
699 if(m_computeThinU) m_matrixU.setIdentity(m_rows,m_diagSize);
700 if(m_computeFullV) m_matrixV.setIdentity(m_cols,m_cols);
701 if(m_computeThinV) m_matrixV.setIdentity(m_cols, m_diagSize);
705 RealScalar maxDiagEntry = m_workMatrix.cwiseAbs().diagonal().maxCoeff();
707 bool finished =
false;
714 for(
Index p = 1;
p < m_diagSize; ++
p)
716 for(
Index q = 0; q <
p; ++q)
721 RealScalar threshold = numext::maxi<RealScalar>(considerAsZero, precision * maxDiagEntry);
722 if(
abs(m_workMatrix.coeff(
p,q))>threshold ||
abs(m_workMatrix.coeff(q,
p)) > threshold)
733 m_workMatrix.applyOnTheLeft(
p,q,j_left);
734 if(computeU()) m_matrixU.applyOnTheRight(
p,q,j_left.
transpose());
736 m_workMatrix.applyOnTheRight(
p,q,j_right);
737 if(computeV()) m_matrixV.applyOnTheRight(
p,q,j_right);
740 maxDiagEntry = numext::maxi<RealScalar>(maxDiagEntry,numext::maxi<RealScalar>(
abs(m_workMatrix.coeff(
p,
p)),
abs(m_workMatrix.coeff(q,q))));
749 for(
Index i = 0;
i < m_diagSize; ++
i)
757 m_singularValues.coeffRef(
i) =
abs(
a);
758 if(computeU()) m_matrixU.col(
i) *= m_workMatrix.coeff(
i,
i)/
a;
764 m_singularValues.coeffRef(
i) =
abs(
a);
765 if(computeU() && (
a<
RealScalar(0))) m_matrixU.col(
i) = -m_matrixU.col(
i);
769 m_singularValues *=
scale;
773 m_nonzeroSingularValues = m_diagSize;
774 for(
Index i = 0;
i < m_diagSize;
i++)
777 RealScalar maxRemainingSingularValue = m_singularValues.tail(m_diagSize-
i).maxCoeff(&pos);
778 if(maxRemainingSingularValue ==
RealScalar(0))
780 m_nonzeroSingularValues =
i;
786 std::swap(m_singularValues.coeffRef(
i), m_singularValues.coeffRef(pos));
787 if(computeU()) m_matrixU.col(pos).swap(m_matrixU.col(
i));
788 if(computeV()) m_matrixV.col(pos).swap(m_matrixV.col(
i));
792 m_isInitialized =
true;
803template<
typename Derived>
ArrayXXi a
Definition Array_initializer_list_23_cxx11.cpp:1
int n
Definition BiCGSTAB_simple.cpp:1
int i
Definition BiCGSTAB_step_by_step.cpp:9
cout<< "Here is the matrix m:"<< endl<< m<< endl;JacobiSVD< MatrixXf > svd(m, ComputeThinU|ComputeThinV)
#define EIGEN_SIZE_MIN_PREFER_DYNAMIC(a, b)
Definition Macros.h:1294
#define eigen_assert(x)
Definition Macros.h:1037
#define EIGEN_IMPLIES(a, b)
Definition Macros.h:1315
#define EIGEN_SIZE_MIN_PREFER_FIXED(a, b)
Definition Macros.h:1302
float * p
Definition Tutorial_Map_using.cpp:9
int rows
Definition Tutorial_commainit_02.cpp:1
int cols
Definition Tutorial_commainit_02.cpp:1
Scalar * b
Definition benchVecAdd.cpp:17
SCALAR Scalar
Definition bench_gemm.cpp:46
NumTraits< Scalar >::Real RealScalar
Definition bench_gemm.cpp:47
MatrixXf MatrixType
Definition benchmark-blocking-sizes.cpp:52
Rotation given by a cosine-sine pair.
Definition Jacobi.h:35
EIGEN_DEVICE_FUNC JacobiRotation transpose() const
Definition Jacobi.h:63
Two-sided Jacobi SVD decomposition of a rectangular matrix.
Definition JacobiSVD.h:490
Index cols() const
Definition SVDBase.h:213
Base::MatrixVType MatrixVType
Definition JacobiSVD.h:508
MatrixType m_scaledMatrix
Definition JacobiSVD.h:611
internal::plain_row_type< MatrixType >::type RowType
Definition JacobiSVD.h:511
Matrix< Scalar, DiagSizeAtCompileTime, DiagSizeAtCompileTime, MatrixOptions, MaxDiagSizeAtCompileTime, MaxDiagSizeAtCompileTime > WorkMatrixType
Definition JacobiSVD.h:515
_MatrixType MatrixType
Definition JacobiSVD.h:494
JacobiSVD & compute(const MatrixType &matrix)
Method performing the decomposition of given matrix using current options.
Definition JacobiSVD.h:570
internal::qr_preconditioner_impl< MatrixType, QRPreconditioner, internal::PreconditionIfMoreColsThanRows > m_qr_precond_morecols
Definition JacobiSVD.h:609
WorkMatrixType m_workMatrix
Definition JacobiSVD.h:602
NumTraits< typenameMatrixType::Scalar >::Real RealScalar
Definition JacobiSVD.h:496
JacobiSVD()
Default Constructor.
Definition JacobiSVD.h:522
JacobiSVD(Index rows, Index cols, unsigned int computationOptions=0)
Default Constructor with memory preallocation.
Definition JacobiSVD.h:532
JacobiSVD & compute(const MatrixType &matrix, unsigned int computationOptions)
Method performing the decomposition of given matrix using custom options.
Definition JacobiSVD.h:666
unsigned int m_computationOptions
Definition SVDBase.h:279
Base::MatrixUType MatrixUType
Definition JacobiSVD.h:507
internal::plain_col_type< MatrixType >::type ColType
Definition JacobiSVD.h:512
Base::SingularValuesType SingularValuesType
Definition JacobiSVD.h:509
Index rows() const
Definition SVDBase.h:212
JacobiSVD(const MatrixType &matrix, unsigned int computationOptions=0)
Constructor performing the decomposition of given matrix.
Definition JacobiSVD.h:547
internal::qr_preconditioner_impl< MatrixType, QRPreconditioner, internal::PreconditionIfMoreRowsThanCols > m_qr_precond_morerows
Definition JacobiSVD.h:610
MatrixType::Scalar Scalar
Definition JacobiSVD.h:495
@ MaxRowsAtCompileTime
Definition JacobiSVD.h:501
@ MaxDiagSizeAtCompileTime
Definition JacobiSVD.h:503
@ MaxColsAtCompileTime
Definition JacobiSVD.h:502
@ ColsAtCompileTime
Definition JacobiSVD.h:499
@ RowsAtCompileTime
Definition JacobiSVD.h:498
@ DiagSizeAtCompileTime
Definition JacobiSVD.h:500
@ MatrixOptions
Definition JacobiSVD.h:504
JacobiSVD< PlainObject > jacobiSvd(unsigned int computationOptions=0) const
Definition JacobiSVD.h:805
NumTraits< Scalar >::Real RealScalar
Definition MatrixBase.h:58
internal::traits< Homogeneous< MatrixType, _Direction > >::Scalar Scalar
Definition MatrixBase.h:56
Base class of SVD algorithms.
Definition SVDBase.h:64
Index cols() const
Definition SVDBase.h:213
bool m_usePrescribedThreshold
Definition SVDBase.h:276
bool m_computeFullV
Definition SVDBase.h:278
Index rank() const
Definition SVDBase.h:148
ComputationInfo m_info
Definition SVDBase.h:275
bool m_computeThinU
Definition SVDBase.h:277
bool computeV() const
Definition SVDBase.h:210
Eigen::Index Index
Definition SVDBase.h:74
bool m_isInitialized
Definition SVDBase.h:276
Index m_cols
Definition SVDBase.h:280
unsigned int m_computationOptions
Definition SVDBase.h:279
MatrixVType m_matrixV
Definition SVDBase.h:273
Index m_diagSize
Definition SVDBase.h:280
bool computeU() const
Definition SVDBase.h:208
Index m_rows
Definition SVDBase.h:280
Index m_nonzeroSingularValues
Definition SVDBase.h:280
Index rows() const
Definition SVDBase.h:212
SingularValuesType m_singularValues
Definition SVDBase.h:274
RealScalar m_prescribedThreshold
Definition SVDBase.h:281
bool m_computeThinV
Definition SVDBase.h:278
bool m_computeFullU
Definition SVDBase.h:277
MatrixUType m_matrixU
Definition SVDBase.h:272
bool m_isAllocated
Definition SVDBase.h:276
Definition TensorRef.h:81
Definition XprHelper.h:258
bool run(JacobiSVD< MatrixType, ColPivHouseholderQRPreconditioner > &svd, const MatrixType &matrix)
Definition JacobiSVD.h:224
MatrixType::Scalar Scalar
Definition JacobiSVD.h:198
void allocate(const JacobiSVD< MatrixType, ColPivHouseholderQRPreconditioner > &svd)
Definition JacobiSVD.h:212
internal::make_proper_matrix_type< Scalar, ColsAtCompileTime, RowsAtCompileTime, Options, MaxColsAtCompileTime, MaxRowsAtCompileTime >::type TransposeTypeWithSameStorageOrder
Definition JacobiSVD.h:210
void allocate(const JacobiSVD< MatrixType, ColPivHouseholderQRPreconditioner > &svd)
Definition JacobiSVD.h:159
bool run(JacobiSVD< MatrixType, ColPivHouseholderQRPreconditioner > &svd, const MatrixType &matrix)
Definition JacobiSVD.h:170
internal::make_proper_matrix_type< Scalar, ColsAtCompileTime, RowsAtCompileTime, Options, MaxColsAtCompileTime, MaxRowsAtCompileTime >::type TransposeTypeWithSameStorageOrder
Definition JacobiSVD.h:120
bool run(JacobiSVD< MatrixType, FullPivHouseholderQRPreconditioner > &svd, const MatrixType &matrix)
Definition JacobiSVD.h:133
void allocate(const JacobiSVD< MatrixType, FullPivHouseholderQRPreconditioner > &svd)
Definition JacobiSVD.h:122
MatrixType::Scalar Scalar
Definition JacobiSVD.h:108
MatrixType::Scalar Scalar
Definition JacobiSVD.h:68
void allocate(const JacobiSVD< MatrixType, FullPivHouseholderQRPreconditioner > &svd)
Definition JacobiSVD.h:76
bool run(JacobiSVD< MatrixType, FullPivHouseholderQRPreconditioner > &svd, const MatrixType &matrix)
Definition JacobiSVD.h:86
Matrix< Scalar, 1, RowsAtCompileTime, RowMajor, 1, MaxRowsAtCompileTime > WorkspaceType
Definition JacobiSVD.h:74
bool run(JacobiSVD< MatrixType, HouseholderQRPreconditioner > &svd, const MatrixType &matrix)
Definition JacobiSVD.h:268
void allocate(const JacobiSVD< MatrixType, HouseholderQRPreconditioner > &svd)
Definition JacobiSVD.h:257
internal::make_proper_matrix_type< Scalar, ColsAtCompileTime, RowsAtCompileTime, Options, MaxColsAtCompileTime, MaxRowsAtCompileTime >::type TransposeTypeWithSameStorageOrder
Definition JacobiSVD.h:307
bool run(JacobiSVD< MatrixType, HouseholderQRPreconditioner > &svd, const MatrixType &matrix)
Definition JacobiSVD.h:321
MatrixType::Scalar Scalar
Definition JacobiSVD.h:295
void allocate(const JacobiSVD< MatrixType, HouseholderQRPreconditioner > &svd)
Definition JacobiSVD.h:309
void allocate(const JacobiSVD< MatrixType, QRPreconditioner > &)
Definition JacobiSVD.h:55
bool run(JacobiSVD< MatrixType, QRPreconditioner > &, const MatrixType &)
Definition JacobiSVD.h:56
Map< Matrix< T, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > matrix(T *data, int rows, int cols, int stride)
Definition common.h:110
@ IsComplex
Definition common.h:98
#define abs(x)
Definition datatypes.h:17
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set set set surface set nocontour set clabel set mapping cartesian set nohidden3d set cntrparam order set cntrparam linear set cntrparam levels auto set cntrparam points set size set set xzeroaxis lt lw set x2zeroaxis lt lw set yzeroaxis lt lw set y2zeroaxis lt lw set tics in set ticslevel set tics scale
Definition gnuplot_common_settings.hh:54
@ NoQRPreconditioner
Definition Constants.h:425
@ HouseholderQRPreconditioner
Definition Constants.h:427
@ ColPivHouseholderQRPreconditioner
Definition Constants.h:429
@ FullPivHouseholderQRPreconditioner
Definition Constants.h:431
@ InvalidInput
Definition Constants.h:449
@ Success
Definition Constants.h:442
@ ComputeFullV
Definition Constants.h:397
@ ComputeThinV
Definition Constants.h:399
@ ComputeFullU
Definition Constants.h:393
@ ComputeThinU
Definition Constants.h:395
DenseIndex ret
Definition level1_cplx_impl.h:44
int EIGEN_BLAS_FUNC() rot(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *pc, RealScalar *ps)
Definition level1_real_impl.h:79
@ PreconditionIfMoreColsThanRows
Definition JacobiSVD.h:30
@ PreconditionIfMoreRowsThanCols
Definition JacobiSVD.h:30
void real_2x2_jacobi_svd(const MatrixType &matrix, Index p, Index q, JacobiRotation< RealScalar > *j_left, JacobiRotation< RealScalar > *j_right)
Definition RealSvd2x2.h:19
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool() isfinite(const Eigen::bfloat16 &h)
Definition BFloat16.h:671
EIGEN_DEVICE_FUNC bool abs2(bool x)
Definition MathFunctions.h:1292
Namespace containing all symbols from the Eigen library.
Definition bench_norm.cpp:85
const AutoDiffScalar< DerType > & conj(const AutoDiffScalar< DerType > &x)
Definition AutoDiffScalar.h:574
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:74
const int Dynamic
Definition Constants.h:22
Definition BandTriangularSolver.h:13
@ IsComplex
Definition NumTraits.h:157
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition NumTraits.h:233
Definition JacobiSVD.h:49
Definition JacobiSVD.h:34
JacobiSVD< MatrixType, QRPreconditioner > SVD
Definition JacobiSVD.h:356
MatrixType::RealScalar RealScalar
Definition JacobiSVD.h:357
static bool run(typename SVD::WorkMatrixType &, SVD &, Index, Index, RealScalar &)
Definition JacobiSVD.h:358
MatrixType::RealScalar RealScalar
Definition JacobiSVD.h:366
JacobiSVD< MatrixType, QRPreconditioner > SVD
Definition JacobiSVD.h:364
static bool run(typename SVD::WorkMatrixType &work_matrix, SVD &svd, Index p, Index q, RealScalar &maxDiagEntry)
Definition JacobiSVD.h:367
MatrixType::Scalar Scalar
Definition JacobiSVD.h:365
Definition JacobiSVD.h:21
_MatrixType MatrixType
Definition JacobiSVD.h:430
Definition ForwardDeclarations.h:17