qpmad
Eigen-based C++ QP solver.
|
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
#include <givens.h>
Public Types | |
enum | Type { NONTRIVIAL = 0 , COPY = 1 , SWAP = 2 } |
Public Member Functions | |
GivensRotation ()=default | |
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, MatrixIndex start, MatrixIndex end, MatrixIndex column_1, MatrixIndex column_2) const |
template<class t_MatrixType > | |
void | applyRowWise (t_MatrixType &M, MatrixIndex start, MatrixIndex end, MatrixIndex row_1, MatrixIndex 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 |
enum qpmad::GivensRotation::Type |
|
default |
|
inline |
|
inline |
|
inlineprivate |
|
inline |
|
inline |
|
inlineprivate |
|
private |
|
private |
|
private |