givens.h
Go to the documentation of this file.
1 /*
2  -------------------------------------------------------------------
3 
4  Copyright (C) 2006-2017, Andrew W. Steiner
5 
6  This file is part of O2scl.
7 
8  O2scl is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 3 of the License, or
11  (at your option) any later version.
12 
13  O2scl is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with O2scl. If not, see <http://www.gnu.org/licenses/>.
20 
21  -------------------------------------------------------------------
22 */
23 /** \file givens.h
24  \brief Header wrapper for \ref givens_base.h
25 */
26 #ifndef O2SCL_GIVENS_H
27 #define O2SCL_GIVENS_H
28 
29 #include <gsl/gsl_math.h>
30 
31 #include <o2scl/err_hnd.h>
32 #include <o2scl/permutation.h>
33 #include <o2scl/cblas.h>
34 
35 namespace o2scl_linalg_bracket {
36 
37 #define O2SCL_IX(V,i) V[i]
38 #define O2SCL_IX2(M,i,j) M[i][j]
39 #include <o2scl/givens_base.h>
40 #undef O2SCL_IX
41 #undef O2SCL_IX2
42 
43 }
44 
45 namespace o2scl_linalg {
46 
47  /** \brief Create a Givens rotation matrix
48 
49  Given values \c a and \c b, create entries \c c and
50  \c s of a matrix for which
51  \f[
52  \left[ \begin{array}{cc} c & -s \\ s & c \end{array} \right]
53  \left[ \begin{array}{c} a \\ b \end{array} \right] =
54  \left[ \begin{array}{c} r \\ 0 \end{array} \right]
55  \f]
56 
57  */
58  void create_givens(const double a, const double b, double &c,
59  double &s);
60 
61 #define O2SCL_IX(V,i) V[i]
62 #define O2SCL_IX2(M,i,j) M(i,j)
63 #include <o2scl/givens_base.h>
64 #undef O2SCL_IX
65 #undef O2SCL_IX2
66 
67 }
68 
69 #endif
The namespace for linear algebra classes and functions with operator()
Definition: bidiag.h:46
void create_givens(const double a, const double b, double &c, double &s)
Create a Givens rotation matrix.
The namespace for linear algebra classes and functions.
Definition: bidiag.h:36

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).