37 template <
typename t_Scalar>
52 t_Scalar abs_b = std::fabs(b);
56 t_Scalar abs_a = std::fabs(a);
64 t = abs_a * std::sqrt(1.0 + t * t);
69 t = abs_b * std::sqrt(1.0 + t * t);
100 void apply(t_Scalar &a, t_Scalar &b)
const
115 template <
class t_MatrixType>
116 void applyColumnWise(t_MatrixType &M,
const int start,
const int end,
const int column_1,
const int column_2)
124 M.col(column_1).segment(start, end - start).swap(M.col(column_2).segment(start, end - start));
127 M.middleRows(start, end - start)
129 .applyOnTheLeft(column_1, column_2, Eigen::JacobiRotation<t_Scalar>(
cos,
sin));
135 template <
class t_MatrixType>
136 void applyRowWise(t_MatrixType &M,
const int start,
const int end,
const int row_1,
const int row_2)
const
143 M.row(row_1).segment(start, end - start).swap(M.row(row_2).segment(start, end - start));
146 M.middleCols(start, end - start)
147 .applyOnTheLeft(row_1, row_2, Eigen::JacobiRotation<t_Scalar>(
cos,
sin));
159 inline void swap(t_Scalar &a, t_Scalar &b)
const
Represents Givens rotation.
void applyColumnWise(t_MatrixType &M, const int start, const int end, const int column_1, const int column_2) const
void applyRowWise(t_MatrixType &M, const int start, const int end, const int row_1, const int row_2) const
void applyNonTrivial(t_Scalar &a, t_Scalar &b) const
Type computeAndApply(t_Scalar &a, t_Scalar &b, const t_Scalar eps)
void swap(t_Scalar &a, t_Scalar &b) const
void apply(t_Scalar &a, t_Scalar &b) const