yat  0.21pre
MatrixConstView.h
1 #ifndef _theplu_yat_utility_matrix_const_view_
2 #define _theplu_yat_utility_matrix_const_view_
3 
4 // $Id: MatrixConstView.h 4141 2022-02-01 05:11:36Z peter $
5 
6 /*
7  Copyright (C) 2022 Peter Johansson
8 
9  This file is part of the yat library, https://dev.thep.lu.se/yat
10 
11  The yat library is free software; you can redistribute it and/or
12  modify it under the terms of the GNU General Public License as
13  published by the Free Software Foundation; either version 3 of the
14  License, or (at your option) any later version.
15 
16  The yat library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with yat. If not, see <https://www.gnu.org/licenses/>.
23 */
24 
25 #include "config_public.h"
26 
27 #include "MatrixBase.h"
28 
29 #include <gsl/gsl_matrix.h>
30 
31 #include <cstddef> // size_t
32 
33 namespace theplu {
34 namespace yat {
35 namespace utility {
36 
40  class MatrixConstView : public MatrixBase
41  {
42  public:
47  MatrixConstView(void);
48 
52  MatrixConstView(const MatrixConstView& other);
53 
57  explicit MatrixConstView(const MatrixBase& other);
58 
66  MatrixConstView(const MatrixBase& other,
67  size_t row_offset, size_t col_offset,
68  size_t rows, size_t columns);
69 
73  explicit MatrixConstView(const gsl_matrix* m);
74 
80  MatrixConstView(const double* p, size_t rows, size_t cols);
81 
87  MatrixConstView(const double* p, size_t rows, size_t cols, size_t tda);
88 
92  ~MatrixConstView(void);
93 
94  const gsl_matrix* gsl_matrix_p(void) const;
95  private:
96  gsl_matrix_const_view* view_;
97  void copy(const gsl_matrix* other);
98  void copy(const gsl_matrix* other, size_t, size_t, size_t, size_t);
99  };
100 
101 }}} // of namespace utility, yat, and theplu
102 
103 #endif
Definition: MatrixBase.h:54
The Department of Theoretical Physics namespace as we define it.
const gsl_matrix * gsl_matrix_p(void) const
Definition: MatrixConstView.h:40

Generated on Wed Jan 25 2023 03:34:29 for yat by  doxygen 1.8.14