11 #ifndef EIGEN_REALSVD2X2_H
12 #define EIGEN_REALSVD2X2_H
20 template<
typename MatrixType,
typename RealScalar,
typename Index>
31 RealScalar t =
m.coeff(0,0) +
m.coeff(1,1);
32 RealScalar d =
m.coeff(1,0) -
m.coeff(0,1);
36 rot1.
s() = RealScalar(0);
37 rot1.
c() = RealScalar(1);
45 rot1.
s() = RealScalar(1) / tmp;
48 m.applyOnTheLeft(0,1,rot1);
const AbsReturnType abs() const
const SqrtReturnType sqrt() const
RealReturnType real() const
Matrix< float, 1, Dynamic > MatrixType
Rotation given by a cosine-sine pair.
bool makeJacobi(const MatrixBase< Derived > &, Index p, Index q)
JacobiRotation transpose() const
The matrix class, also used for vectors and row-vectors.
bfloat16() min(const bfloat16 &a, const bfloat16 &b)
void real_2x2_jacobi_svd(const MatrixType &matrix, Index p, Index q, JacobiRotation< RealScalar > *j_left, JacobiRotation< RealScalar > *j_right)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_abs_op< typename Derived::Scalar >, const Derived > abs(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_sqrt_op< typename Derived::Scalar >, const Derived > sqrt(const Eigen::ArrayBase< Derived > &x)