Psi4
view.h
Go to the documentation of this file.
1 /*
2  * @BEGIN LICENSE
3  *
4  * Psi4: an open-source quantum chemistry software package
5  *
6  * Copyright (c) 2007-2017 The Psi4 Developers.
7  *
8  * The copyrights for code used from other parties are included in
9  * the corresponding files.
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program 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
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License along
22  * with this program; if not, write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  *
25  * @END LICENSE
26  */
27 
28 #ifndef libmints_view_h_
29 #define libmints_view_h_
30 
31 #include "typedefs.h"
32 
33 namespace psi {
34 
35 struct dpdfile2;
36 
37 class PSIO;
38 class Matrix;
39 class Vector;
40 class SimpleVector;
41 class Dimension;
42 
43 // Forward declarations
45 
46 
51 class View
52 {
53 protected:
57  int nirrep_;
64 
65 private:
66  View(); // No default constructor
67  View(const View& ); // No copy constructor
68 
69 public:
70  virtual ~View();
71 
77  View(int nirrep, int *rows, int *cols);
85  View(int nirrep, int *rows, int *cols, int *row_offsets, int *col_offsets);
91  View(SharedMatrix matrix, const Dimension& rows, const Dimension& cols);
99  View(SharedMatrix matrix,
100  const Dimension& rows, const Dimension& cols,
101  const Dimension& row_offsets, const Dimension& col_offsets);
102 
107 
113 };
114 
115 }
116 
117 #endif
int * cols_per_irrep_
Definition: view.h:63
Provides a view to a region of the matrix.
Definition: view.h:51
SharedMatrix matrix_
Matrix we are viewing.
Definition: view.h:55
int * col_offset_per_irrep_
Definition: view.h:60
virtual ~View()
Definition: view.cc:47
Definition: dimension.h:39
SharedMatrix view(SharedMatrix matrix)
Definition: view.cc:170
int * row_offset_per_irrep_
Starting offsets in matrix_;.
Definition: view.h:59
std::shared_ptr< Matrix > SharedMatrix
Definition: adc.h:50
int nirrep_
Number of irreps.
Definition: view.h:57
SharedMatrix operator()()
Definition: view.cc:150
int * rows_per_irrep_
Number of rows we are viewing.
Definition: view.h:62