Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Eigen_test Odometry_test AttitudeEstimation_usingTicker MPU9250_Quaternion_Binary_Serial ... more
JacobiRotation< Scalar > Class Template Reference
[Jacobi module]
  #include <Jacobi.h>
| Public Member Functions | |
| JacobiRotation () | |
| Default constructor without any initialization. | |
| JacobiRotation (const Scalar &c, const Scalar &s) | |
| Construct a planar rotation from a cosine-sine pair (c, s). | |
| JacobiRotation | operator* (const JacobiRotation &other) | 
| Concatenates two planar rotation. | |
| JacobiRotation | transpose () const | 
| Returns the transposed transformation. | |
| JacobiRotation | adjoint () const | 
| Returns the adjoint transformation. | |
| template<typename Derived > | |
| bool | makeJacobi (const MatrixBase< Derived > &, typename Derived::Index p, typename Derived::Index q) | 
| Makes *thisas a Jacobi rotationJsuch that applying J on both the right and left sides of the 2x2 selfadjoint matrix yields a diagonal matrix  . | |
| bool | makeJacobi (const RealScalar &x, const Scalar &y, const RealScalar &z) | 
| Makes *thisas a Jacobi rotation J such that applying J on both the right and left sides of the selfadjoint 2x2 matrix yields a diagonal matrix  . | |
| void | makeGivens (const Scalar &p, const Scalar &q, Scalar *z=0) | 
| Makes *thisas a Givens rotationGsuch that applying to the left of the vector  yields:  . | |
Detailed Description
template<typename Scalar>
 class Eigen::JacobiRotation< Scalar >
Rotation given by a cosine-sine pair.
This class represents a Jacobi or Givens rotation. This is a 2D rotation in the plane J of angle  defined by its cosine
 defined by its cosine c and sine s as follow: 
You can apply the respective counter-clockwise rotation to a column vector v by applying its adjoint on the left:  that translates to the following Eigen code:
 that translates to the following Eigen code: 
v.applyOnTheLeft(J.adjoint());
Definition at line 34 of file src/Jacobi/Jacobi.h.
Constructor & Destructor Documentation
| JacobiRotation | ( | ) | 
Default constructor without any initialization.
Definition at line 40 of file src/Jacobi/Jacobi.h.
| JacobiRotation | ( | const Scalar & | c, | 
| const Scalar & | s | ||
| ) | 
Construct a planar rotation from a cosine-sine pair (c, s). 
Definition at line 43 of file src/Jacobi/Jacobi.h.
Member Function Documentation
| JacobiRotation adjoint | ( | ) | const | 
Returns the adjoint transformation.
Definition at line 62 of file src/Jacobi/Jacobi.h.
| void makeGivens | ( | const Scalar & | p, | 
| const Scalar & | q, | ||
| Scalar * | z = 0 | ||
| ) | 
Makes *this as a Givens rotation G such that applying  to the left of the vector
 to the left of the vector  yields:
 yields:  .
. 
The value of z is returned if z 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.
Definition at line 148 of file src/Jacobi/Jacobi.h.
| bool 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  yields a diagonal matrix
 yields a diagonal matrix  .
. 
- See also:
- MatrixBase::makeJacobi(const MatrixBase<Derived>&, Index, Index), MatrixBase::applyOnTheLeft(), MatrixBase::applyOnTheRight()
Definition at line 83 of file src/Jacobi/Jacobi.h.
| bool makeJacobi | ( | const MatrixBase< Derived > & | m, | 
| typename Derived::Index | p, | ||
| typename Derived::Index | q | ||
| ) | 
Makes *this as a Jacobi rotation J such that applying J on both the right and left sides of the 2x2 selfadjoint matrix  yields a diagonal matrix
 yields a diagonal matrix  .
. 
Example:
Output:
- See also:
- JacobiRotation::makeJacobi(RealScalar, Scalar, RealScalar), MatrixBase::applyOnTheLeft(), MatrixBase::applyOnTheRight()
Definition at line 126 of file src/Jacobi/Jacobi.h.
| JacobiRotation operator* | ( | const JacobiRotation< Scalar > & | other ) | 
Concatenates two planar rotation.
Definition at line 51 of file src/Jacobi/Jacobi.h.
| JacobiRotation transpose | ( | ) | const | 
Returns the transposed transformation.
Definition at line 59 of file src/Jacobi/Jacobi.h.
Generated on Tue Jul 12 2022 17:47:05 by
 1.7.2
 1.7.2