Into

Modules

Documentation

classPiiPlaneRotation

#include <PiiPlaneRotation.h>

Represents a rotation parallel to a plane spanned by two coordinates axes.

Description

The rotation can be represented by a matrix of the form

Note that the rotation only affects the rows and columns that have non-zero off-diagonal entries in R. Therefore, it only affects a two-dimensional subspace of the full n-dimensional space. When applied from the left, the rotation matrix rotates column vectors and touches only two rows in the matrix. When applied from the right, row vectors will be rotated and only two columns will be affected.

This class does not store the full rotation matrix. Instead, just the coefficients c and s are stored.

Constructors and destructor

(
  • T c_
  • T s_
)

Public member functions

( )

Combines two rotations to one as if the rotation matrices were multiplied.

( )
bool
( )

Returns true if other is equal to this, and false otherwise.

template<class Matrix>
void
( )

Applies the rotation matrix to mat from the left.

template<class Matrix>
void
( )

Applies the rotation matrix to mat from the right.

template<class T>
(
  • T a
  • T b
  • T * r = 0
)

Creates a matrix that rotates a column vector [a, b]' so that it becomes [r, 0]' when applied from the left.

template<class T>
(
  • T a
  • T b
  • T c
)

Creates a matrix that, when applied as a similarity transform, zeroes a pair of off-diagonal entries in a Hermitian (or self-adjoint, in the real case symmetric) 2-by-2 matrix.

template<class T>
( )

Returns the transpose of rotation.

Function details

  • PiiPlaneRotation

    (
    • T c_
    • T s_
    )
    [inline]
  • PiiPlaneRotation

    ()
    [inline]
  • PiiPlaneRotation

    ( )
    [inline]
  • PiiPlaneRotation operator*

    ( )
    [inline]

    Combines two rotations to one as if the rotation matrices were multiplied.

  • PiiPlaneRotation & operator=

    ( )
    [inline]
  • bool operator==

    ( )
    [inline]

    Returns true if other is equal to this, and false otherwise.

  • template<class Matrix>

    void rotateColumns

    ( )
    [inline]

    Applies the rotation matrix to mat from the left.

    The vectors to be rotated are stored as column vectors in mat, hence the name. The rotation will affect all columns but only rows p and q (p < q).

  • template<class Matrix>

    void rotateRows

    ( )
    [inline]

    Applies the rotation matrix to mat from the right.

    The vectors to be rotated are stored as row vectors in mat, hence the name. The rotation will affect all rows but only columns p and q (p < q).

  • template<class T>

    PiiPlaneRotation< T > givensRotation

    (
    • T a
    • T b
    • T * r = 0
    )

    Creates a matrix that rotates a column vector [a, b]' so that it becomes [r, 0]' when applied from the left.

  • template<class T>

    PiiPlaneRotation< T > jacobiRotation

    (
    • T a
    • T b
    • T c
    )

    Creates a matrix that, when applied as a similarity transform, zeroes a pair of off-diagonal entries in a Hermitian (or self-adjoint, in the real case symmetric) 2-by-2 matrix.

    where * denotes a complex conjugate.

    The rotation matrix R is chosen so that a similarity transform on A yields a diagonal matrix:

    where d and e are non-zero. is the Hermitian transpose of R.

  • template<class T>

    PiiPlaneRotation< T > transpose

    ( )

    Returns the transpose of rotation.

    Since rotation matrices are orthogonal, the transposition of a rotation matrix equals its inverse (rotation to the opposite direction).

Notes (0)

Add a note

Not a single note added yet. Be the first, add yours.