![]() |
|
Rotation given by a cosine-sine pair. More...
#include <Jacobi.h>
Public Types | |
typedef NumTraits< Scalar >::Real | RealScalar |
Public Member Functions | |
EIGEN_DEVICE_FUNC | JacobiRotation () |
EIGEN_DEVICE_FUNC | JacobiRotation (const Scalar &c, const Scalar &s) |
EIGEN_DEVICE_FUNC Scalar & | c () |
EIGEN_DEVICE_FUNC Scalar | c () const |
EIGEN_DEVICE_FUNC Scalar & | s () |
EIGEN_DEVICE_FUNC Scalar | s () const |
EIGEN_DEVICE_FUNC JacobiRotation | operator* (const JacobiRotation &other) |
EIGEN_DEVICE_FUNC JacobiRotation | transpose () const |
EIGEN_DEVICE_FUNC JacobiRotation | adjoint () const |
template<typename Derived > | |
EIGEN_DEVICE_FUNC bool | makeJacobi (const MatrixBase< Derived > &, Index p, Index q) |
EIGEN_DEVICE_FUNC bool | makeJacobi (const RealScalar &x, const Scalar &y, const RealScalar &z) |
EIGEN_DEVICE_FUNC void | makeGivens (const Scalar &p, const Scalar &q, Scalar *r=0) |
Protected Member Functions | |
EIGEN_DEVICE_FUNC void | makeGivens (const Scalar &p, const Scalar &q, Scalar *r, internal::true_type) |
EIGEN_DEVICE_FUNC void | makeGivens (const Scalar &p, const Scalar &q, Scalar *r, internal::false_type) |
Protected Attributes | |
Scalar | m_c |
Scalar | m_s |
Rotation given by a cosine-sine pair.
\jacobi_module
This class represents a Jacobi or Givens rotation. This is a 2D rotation in the plane J
of angle \( \theta \) defined by its cosine c
and sine s
as follow: \( J = \left ( \begin{array}{cc} c & \overline s \\ -s & \overline c \end{array} \right ) \)
You can apply the respective counter-clockwise rotation to a column vector v
by applying its adjoint on the left: \( v = J^* v \) that translates to the following Eigen code:
typedef NumTraits<Scalar>::Real Eigen::JacobiRotation< Scalar >::RealScalar |
|
inline |
Default constructor without any initialization.
Referenced by Eigen::JacobiRotation< Scalar >::adjoint(), Eigen::JacobiRotation< Scalar >::operator*(), and Eigen::JacobiRotation< Scalar >::transpose().
|
inline |
Construct a planar rotation from a cosine-sine pair (c, s
).
|
inline |
Returns the adjoint transformation
References conj(), Eigen::conj(), Eigen::JacobiRotation< Scalar >::JacobiRotation(), Eigen::JacobiRotation< Scalar >::m_c, and Eigen::JacobiRotation< Scalar >::m_s.
Referenced by Eigen::internal::matrix_function_permute_schur().
|
inline |
References Eigen::JacobiRotation< Scalar >::m_c.
Referenced by Eigen::internal::lmqrsolv(), Eigen::internal::qrsolv(), Eigen::internal::r1updt(), and Eigen::internal::real_2x2_jacobi_svd().
|
inline |
References Eigen::JacobiRotation< Scalar >::m_c.
|
protected |
References abs(), Eigen::numext::abs2(), Eigen::numext::is_exactly_zero(), p, Eigen::numext::q, UniformPSDSelfTest::r, sqrt(), and plotPSD::t.
|
protected |
References abs(), Eigen::numext::abs2(), conj(), Eigen::conj(), p, p1, ps, Eigen::numext::q, UniformPSDSelfTest::r, and sqrt().
EIGEN_DEVICE_FUNC void Eigen::JacobiRotation< Scalar >::makeGivens | ( | const Scalar & | p, |
const Scalar & | q, | ||
Scalar * | r = 0 |
||
) |
Makes *this
as a Givens rotation G
such that applying \( G^* \) to the left of the vector \( V = \left ( \begin{array}{c} p \\ q \end{array} \right )\) yields: \( G^* V = \left ( \begin{array}{c} r \\ 0 \end{array} \right )\).
The value of r is returned if r is not null (the default is null). Also note that G is built such that the cosine is always real.
Example:
Output:
This function implements the continuous Givens rotation generation algorithm found in Anderson (2000), Discontinuous Plane Rotations and the Symmetric Eigenvalue Problem. LAPACK Working Note 150, University of Tennessee, UT-CS-00-454, December 4, 2000.
References makeGivens(), p, Eigen::numext::q, and UniformPSDSelfTest::r.
Referenced by Eigen::internal::llt_rank_update_lower(), Eigen::internal::lmqrsolv(), Eigen::internal::matrix_function_permute_schur(), Eigen::internal::qrsolv(), and Eigen::internal::r1updt().
|
inline |
Makes *this
as a Jacobi rotation J
such that applying J on both the right and left sides of the 2x2 selfadjoint matrix \( B = \left ( \begin{array}{cc} \text{this}_{pp} & \text{this}_{pq} \\ (\text{this}_{pq})^* & \text{this}_{qq} \end{array} \right )\) yields a diagonal matrix \( A = J^* B J \)
Example:
Output:
References m, makeJacobi(), p, and Eigen::numext::q.
Referenced by Eigen::internal::real_2x2_jacobi_svd().
EIGEN_DEVICE_FUNC bool Eigen::JacobiRotation< Scalar >::makeJacobi | ( | const RealScalar & | x, |
const Scalar & | y, | ||
const RealScalar & | z | ||
) |
Makes *this
as a Jacobi rotation J such that applying J on both the right and left sides of the selfadjoint 2x2 matrix \( B = \left ( \begin{array}{cc} x & y \\ \overline y & z \end{array} \right )\) yields a diagonal matrix \( A = J^* B J \)
References abs(), Eigen::numext::abs2(), conj(), min, n, sqrt(), plotPSD::t, w, plotDoE::x, and y.
|
inline |
Concatenates two planar rotation
References conj(), Eigen::conj(), Eigen::JacobiRotation< Scalar >::JacobiRotation(), Eigen::JacobiRotation< Scalar >::m_c, and Eigen::JacobiRotation< Scalar >::m_s.
|
inline |
References Eigen::JacobiRotation< Scalar >::m_s.
Referenced by Eigen::internal::lmqrsolv(), Eigen::internal::qrsolv(), Eigen::internal::r1updt(), and Eigen::internal::real_2x2_jacobi_svd().
|
inline |
References Eigen::JacobiRotation< Scalar >::m_s.
|
inline |
Returns the transposed transformation
References conj(), Eigen::conj(), Eigen::JacobiRotation< Scalar >::JacobiRotation(), Eigen::JacobiRotation< Scalar >::m_c, and Eigen::JacobiRotation< Scalar >::m_s.
Referenced by Eigen::RealQZ< MatrixType_ >::compute(), Eigen::JacobiSVD< MatrixType_, Options_ >::compute_impl(), and Eigen::internal::real_2x2_jacobi_svd().
|
protected |
|
protected |