Function create_givens (o2scl_linalg)¶
-
void o2scl_linalg::create_givens(const double a, const double b, double &c, double &s)¶
Create a Givens rotation matrix.
Given values
a
andb
, create entriesc
ands
of a matrix for which\[\begin{split} \left[ \begin{array}{cc} c & -s \\ s & c \end{array} \right] \left[ \begin{array}{c} a \\ b \end{array} \right] = \left[ \begin{array}{c} r \\ 0 \end{array} \right] \end{split}\]