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,
47template<
typename MatrixType,
int QRPreconditioner,
int Case,
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())
88 if(matrix.rows() > matrix.cols())
91 svd.
m_workMatrix = m_qr.matrixQR().block(0,0,matrix.cols(),matrix.cols()).template triangularView<Upper>();
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());
135 if(matrix.cols() > matrix.rows())
137 m_adjoint = matrix.adjoint();
138 m_qr.compute(m_adjoint);
139 svd.
m_workMatrix = m_qr.matrixQR().block(0,0,matrix.rows(),matrix.rows()).template triangularView<Upper>().adjoint();
149 TransposeTypeWithSameStorageOrder m_adjoint;
155template<
typename MatrixType>
161 if (svd.
rows() != m_qr.rows() || svd.
cols() != m_qr.cols())
172 if(matrix.rows() > matrix.cols())
174 m_qr.compute(matrix);
175 svd.
m_workMatrix = m_qr.matrixQR().block(0,0,matrix.cols(),matrix.cols()).template triangularView<Upper>();
179 svd.
m_matrixU.setIdentity(matrix.rows(), matrix.cols());
180 m_qr.householderQ().applyThisOnTheLeft(svd.
m_matrixU, m_workspace);
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())
221 m_adjoint.resize(svd.
cols(), svd.
rows());
226 if(matrix.cols() > matrix.rows())
228 m_adjoint = matrix.adjoint();
229 m_qr.compute(m_adjoint);
231 svd.
m_workMatrix = m_qr.matrixQR().block(0,0,matrix.rows(),matrix.rows()).template triangularView<Upper>().adjoint();
235 svd.
m_matrixV.setIdentity(matrix.cols(), matrix.rows());
236 m_qr.householderQ().applyThisOnTheLeft(svd.
m_matrixV, m_workspace);
247 TransposeTypeWithSameStorageOrder m_adjoint;
253template<
typename MatrixType>
259 if (svd.
rows() != m_qr.rows() || svd.
cols() != m_qr.cols())
270 if(matrix.rows() > matrix.cols())
272 m_qr.compute(matrix);
273 svd.
m_workMatrix = m_qr.matrixQR().block(0,0,matrix.cols(),matrix.cols()).template triangularView<Upper>();
277 svd.
m_matrixU.setIdentity(matrix.rows(), matrix.cols());
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())
318 m_adjoint.resize(svd.
cols(), svd.
rows());
323 if(matrix.cols() > matrix.rows())
325 m_adjoint = matrix.adjoint();
326 m_qr.compute(m_adjoint);
328 svd.
m_workMatrix = m_qr.matrixQR().block(0,0,matrix.rows(),matrix.rows()).template triangularView<Upper>().adjoint();
332 svd.
m_matrixV.setIdentity(matrix.cols(), matrix.rows());
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;
387 work_matrix.row(p) *= z;
393 work_matrix.row(q) *= z;
400 rot.
c() = conj(work_matrix.
coeff(p,p)) / n;
401 rot.
s() = work_matrix.
coeff(q,p) / n;
402 work_matrix.applyOnTheLeft(p,q,rot);
407 work_matrix.col(q) *= z;
413 work_matrix.row(q) *= 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);
549 compute(matrix, 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);
679 RealScalar scale = matrix.cwiseAbs().template maxCoeff<PropagateNaN>();
681 m_isInitialized =
true;
691 m_scaledMatrix = matrix / scale;
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>
EIGEN_DEVICE_FUNC RealReturnType real() const
Definition: CommonCwiseUnaryOps.h:100
EIGEN_DEVICE_FUNC const ImagReturnType imag() const
Definition: CommonCwiseUnaryOps.h:109
#define EIGEN_SIZE_MIN_PREFER_DYNAMIC(a, b)
Definition: Macros.h:1304
#define eigen_assert(x)
Definition: Macros.h:1047
#define EIGEN_IMPLIES(a, b)
Definition: Macros.h:1325
#define EIGEN_SIZE_MIN_PREFER_FIXED(a, b)
Definition: Macros.h:1312
\jacobi_module
Definition: Jacobi.h:35
EIGEN_DEVICE_FUNC JacobiRotation transpose() const
Returns the transposed transformation.
Definition: Jacobi.h:63
EIGEN_DEVICE_FUNC Scalar & s()
Definition: Jacobi.h:49
EIGEN_DEVICE_FUNC JacobiRotation adjoint() const
Returns the adjoint transformation.
Definition: Jacobi.h:67
EIGEN_DEVICE_FUNC Scalar & c()
Definition: Jacobi.h:47
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
bool m_computeFullV
Definition: SVDBase.h:278
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
@ 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 & compute(const MatrixType &matrix)
Method performing the decomposition of given matrix using current options.
Definition: JacobiSVD.h:570
bool m_computeThinU
Definition: SVDBase.h:277
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
bool computeV() const
Definition: SVDBase.h:210
unsigned int m_computationOptions
Definition: SVDBase.h:279
MatrixVType m_matrixV
Definition: SVDBase.h:273
bool computeU() const
Definition: SVDBase.h:208
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
bool m_computeThinV
Definition: SVDBase.h:278
bool m_computeFullU
Definition: SVDBase.h:277
MatrixUType m_matrixU
Definition: SVDBase.h:272
MatrixType::Scalar Scalar
Definition: JacobiSVD.h:495
JacobiSVD< PlainObject > jacobiSvd(unsigned int computationOptions=0) const
\svd_module
Definition: JacobiSVD.h:805
NumTraits< Scalar >::Real RealScalar
Definition: MatrixBase.h:58
internal::traits< MatrixWrapper< ExpressionType > >::Scalar Scalar
Definition: MatrixBase.h:56
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index rowId, Index colId)
This is an overloaded version of DenseCoeffsBase<Derived,WriteAccessors>::coeffRef(Index,...
Definition: PlainObjectBase.h:175
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & coeff(Index rowId, Index colId) const
This is an overloaded version of DenseCoeffsBase<Derived,ReadOnlyAccessors>::coeff(Index,...
Definition: PlainObjectBase.h:152
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
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: XprHelper.h:258
void allocate(const JacobiSVD< MatrixType, ColPivHouseholderQRPreconditioner > &svd)
Definition: JacobiSVD.h:159
bool run(JacobiSVD< MatrixType, ColPivHouseholderQRPreconditioner > &svd, const MatrixType &matrix)
Definition: JacobiSVD.h:170
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
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
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
bool run(JacobiSVD< MatrixType, HouseholderQRPreconditioner > &svd, const MatrixType &matrix)
Definition: JacobiSVD.h:268
void allocate(const JacobiSVD< MatrixType, HouseholderQRPreconditioner > &svd)
Definition: JacobiSVD.h:257
void allocate(const JacobiSVD< MatrixType, QRPreconditioner > &)
Definition: JacobiSVD.h:55
bool run(JacobiSVD< MatrixType, QRPreconditioner > &, const MatrixType &)
Definition: JacobiSVD.h:56
type
Definition: core.h:575
UnitType abs(const UnitType x) noexcept
Compute absolute value.
Definition: math.h:721
auto sqrt(const UnitType &value) noexcept -> unit_t< square_root< typename units::traits::unit_t_traits< UnitType >::unit_type >, typename units::traits::unit_t_traits< UnitType >::underlying_type, linear_scale >
computes the square root of value
Definition: math.h:483
@ NoQRPreconditioner
Do not specify what is to be done if the SVD of a non-square matrix is asked for.
Definition: Constants.h:425
@ HouseholderQRPreconditioner
Use a QR decomposition without pivoting as the first step.
Definition: Constants.h:427
@ ColPivHouseholderQRPreconditioner
Use a QR decomposition with column pivoting as the first step.
Definition: Constants.h:429
@ FullPivHouseholderQRPreconditioner
Use a QR decomposition with full pivoting as the first step.
Definition: Constants.h:431
@ InvalidInput
The inputs are invalid, or the algorithm has been improperly called.
Definition: Constants.h:449
@ Success
Computation was successful.
Definition: Constants.h:442
@ ComputeFullV
Used in JacobiSVD to indicate that the square matrix V is to be computed.
Definition: Constants.h:397
@ ComputeThinV
Used in JacobiSVD to indicate that the thin matrix V is to be computed.
Definition: Constants.h:399
@ ComputeFullU
Used in JacobiSVD to indicate that the square matrix U is to be computed.
Definition: Constants.h:393
@ ComputeThinU
Used in JacobiSVD to indicate that the thin matrix U is to be computed.
Definition: Constants.h:395
constexpr common_t< T1, T2 > min(const T1 x, const T2 y) noexcept
Compile-time pairwise minimum function.
Definition: min.hpp:35
@ 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: Core:141
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
const int Dynamic
This value means that a positive quantity (e.g., a size) is not known at compile-time,...
Definition: Constants.h:22
Definition: Eigen_Colamd.h:50
void swap(wpi::SmallPtrSet< T, N > &LHS, wpi::SmallPtrSet< T, N > &RHS)
Implement std::swap in terms of SmallPtrSet swap.
Definition: SmallPtrSet.h:512
@ IsComplex
Definition: NumTraits.h:157
T Real
Definition: NumTraits.h:164
Holds information about the various numeric (i.e.
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