qr.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 qr.h
24  \brief Header wrapper for \ref qr_base.h
25 */
26 #ifndef O2SCL_QR_H
27 #define O2SCL_QR_H
28 
29 #include <o2scl/err_hnd.h>
30 #include <o2scl/permutation.h>
31 #include <o2scl/cblas.h>
32 #include <o2scl/householder.h>
33 #include <o2scl/givens.h>
34 
35 namespace o2scl_linalg {
36 
37 #define O2SCL_IX(V,i) V[i]
38 #define O2SCL_IX2(M,i,j) M(i,j)
39 #ifndef DOXYGEN
40 #include <o2scl/qr_base.h>
41 #endif
42 #undef O2SCL_IX
43 #undef O2SCL_IX2
44 
45 }
46 
47 namespace o2scl_linalg_bracket {
48 
49 #define O2SCL_IX(V,i) V[i]
50 #define O2SCL_IX2(M,i,j) M[i][j]
51 #ifndef DOXYGEN
52 #include <o2scl/qr_base.h>
53 #endif
54 #undef O2SCL_IX
55 #undef O2SCL_IX2
56 
57 }
58 
59 #if defined (O2SCL_COND_FLAG) || defined (DOXYGEN)
60 
61 #if defined (O2SCL_ARMA) || defined (DOXYGEN)
62 #include <armadillo>
63 namespace o2scl_linalg {
64 
65  /** \brief Armadillo specialization of \ref QR_decomp_unpack().
66  */
67  template<>
68  void QR_decomp_unpack<arma::mat,arma::mat,arma::mat>
69  (const size_t M, const size_t N, arma::mat &A, arma::mat &Q,
70  arma::mat &R);
71 
72 }
73 #endif
74 
75 #if defined (O2SCL_EIGEN) || defined (DOXYGEN)
76 #include <eigen3/Eigen/Dense>
77 namespace o2scl_linalg {
78 
79  /** \brief Eigen specialization of \ref QR_decomp_unpack().
80  */
81  template<>
82  void QR_decomp_unpack<Eigen::MatrixXd,Eigen::MatrixXd,Eigen::MatrixXd>
83  (const size_t M, const size_t N, Eigen::MatrixXd &A,
84  Eigen::MatrixXd &Q, Eigen::MatrixXd &R);
85 
86 }
87 #endif
88 
89 #else
90 #include <o2scl/qr_special.h>
91 #endif
92 
93 #endif
The namespace for linear algebra classes and functions with operator()
Definition: bidiag.h:46
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).