qpmad
Eigen-based C++ QP solver.
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
qpmad::GivensRotation< t_Scalar > Class Template Reference

Detailed Description

template<typename t_Scalar>
class qpmad::GivensRotation< t_Scalar >

Represents Givens rotation.

[ cos, sin ] [ ] [ -sin, cos ]

for a given vector (a, b) is defined with

[ cos, sin ] [ a ] [ d ] [ ] * [ ] = [ ] [ -sin, cos ] [ b ] [ 0 ]

sin^2 + cos^2 = 1

Special cases: COPY b == 0: cos = 1, sin = 0 SWAP (b != 0) && (a == 0): cos = 0, sin = 1

Definition at line 38 of file givens.h.

#include <givens.h>

Public Types

enum  Type { NONTRIVIAL = 0, COPY = 1, SWAP = 2 }
 

Public Member Functions

Type computeAndApply (t_Scalar &a, t_Scalar &b, const t_Scalar eps)
 
void apply (t_Scalar &a, t_Scalar &b) const
 
template<class t_MatrixType >
void applyColumnWise (t_MatrixType &M, const int start, const int end, const int column_1, const int column_2) const
 
template<class t_MatrixType >
void applyRowWise (t_MatrixType &M, const int start, const int end, const int row_1, const int row_2) const
 

Private Member Functions

void swap (t_Scalar &a, t_Scalar &b) const
 
void applyNonTrivial (t_Scalar &a, t_Scalar &b) const
 

Private Attributes

Type type
 
t_Scalar cos
 
t_Scalar sin
 

Member Enumeration Documentation

◆ Type

template<typename t_Scalar>
enum qpmad::GivensRotation::Type
Enumerator
NONTRIVIAL 
COPY 
SWAP 

Definition at line 41 of file givens.h.

Member Function Documentation

◆ apply()

template<typename t_Scalar>
void qpmad::GivensRotation< t_Scalar >::apply ( t_Scalar &  a,
t_Scalar &  b 
) const
inline

Definition at line 100 of file givens.h.

◆ applyColumnWise()

template<typename t_Scalar>
template<class t_MatrixType >
void qpmad::GivensRotation< t_Scalar >::applyColumnWise ( t_MatrixType &  M,
const int  start,
const int  end,
const int  column_1,
const int  column_2 
) const
inline

Definition at line 116 of file givens.h.

◆ applyNonTrivial()

template<typename t_Scalar>
void qpmad::GivensRotation< t_Scalar >::applyNonTrivial ( t_Scalar &  a,
t_Scalar &  b 
) const
inlineprivate

Definition at line 164 of file givens.h.

◆ applyRowWise()

template<typename t_Scalar>
template<class t_MatrixType >
void qpmad::GivensRotation< t_Scalar >::applyRowWise ( t_MatrixType &  M,
const int  start,
const int  end,
const int  row_1,
const int  row_2 
) const
inline

Definition at line 136 of file givens.h.

◆ computeAndApply()

template<typename t_Scalar>
Type qpmad::GivensRotation< t_Scalar >::computeAndApply ( t_Scalar &  a,
t_Scalar &  b,
const t_Scalar  eps 
)
inline

Definition at line 50 of file givens.h.

◆ swap()

template<typename t_Scalar>
void qpmad::GivensRotation< t_Scalar >::swap ( t_Scalar &  a,
t_Scalar &  b 
) const
inlineprivate

Definition at line 159 of file givens.h.

Member Data Documentation

◆ cos

template<typename t_Scalar>
t_Scalar qpmad::GivensRotation< t_Scalar >::cos
private

Definition at line 154 of file givens.h.

◆ sin

template<typename t_Scalar>
t_Scalar qpmad::GivensRotation< t_Scalar >::sin
private

Definition at line 155 of file givens.h.

◆ type

template<typename t_Scalar>
Type qpmad::GivensRotation< t_Scalar >::type
private

Definition at line 153 of file givens.h.


The documentation for this class was generated from the following file: