v2DM-DOCI  1.0
SPM.h
Go to the documentation of this file.
1 /*
2  * @BEGIN LICENSE
3  *
4  * Copyright (C) 2014-2015 Ward Poelmans
5  *
6  * This file is part of v2DM-DOCI.
7  *
8  * v2DM-DOCI 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  * Foobar 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 Foobar. If not, see <http://www.gnu.org/licenses/>.
20  *
21  * @END LICENSE
22  */
23 
24 #ifndef SPM_H
25 #define SPM_H
26 
27 #include <iostream>
28 
29 #include "BlockStructure.h"
30 
31 namespace simanneal { class OptIndex; }
32 
33 namespace doci2DM
34 {
35 
36 class TPM;
37 class PHM;
38 
39 class SPM: public BlockVector
40 {
41  friend std::ostream &operator<<(std::ostream &output,SPM &spm);
42 
43  public:
44 
45  SPM(int L, int N);
46 
47  SPM(const TPM &);
48 
49  SPM(const SPM &) = default;
50 
51  SPM(SPM &&) = default;
52 
53  virtual ~SPM() = default;
54 
55  SPM& operator=(const SPM &) = default;
56 
57  SPM& operator=(SPM &&) = default;
58 
59  using BlockVector::operator=;
60 
61  using BlockVector::operator[];
62 
63  using BlockVector::operator();
64 
65  // do NOT override the operator()(int,int) from BlockVector
66  double GetElement(int, int) const;
67 
68  int gN() const;
69 
70  int gL() const;
71 
72  int gn() const;
73 
74  void bar(double, const TPM &);
75 
76  void bar2(double, const TPM &);
77 
78  void bar3(double, const TPM &);
79 
80  void bar(double, const PHM &);
81 
82  void PrintSorted() const;
83 
84  std::vector<double> Particlesperirrep(const simanneal::OptIndex &index, bool print=true) const;
85 
86  private:
87 
89  int N;
90 
92  int L;
93 };
94 
95 }
96 
97 #endif /* SPM_H */
98 
99 /* vim: set ts=3 sw=3 expandtab :*/
virtual ~SPM()=default
SPM(int L, int N)
Definition: SPM.cpp:38
void PrintSorted() const
Definition: SPM.cpp:173
void bar(double, const TPM &)
Definition: SPM.cpp:97
double GetElement(int, int) const
Definition: SPM.cpp:84
int L
the size of the sp DOCI space (there are 2*L sp states)
Definition: SPM.h:92
void bar2(double, const TPM &)
Definition: SPM.cpp:112
int gn() const
Definition: SPM.cpp:71
int N
number of particles
Definition: SPM.h:89
int gN() const
Definition: SPM.cpp:61
int gL() const
Definition: SPM.cpp:66
std::vector< double > Particlesperirrep(const simanneal::OptIndex &index, bool print=true) const
Definition: SPM.cpp:196
friend std::ostream & operator<<(std::ostream &output, SPM &spm)
Definition: SPM.cpp:146
void bar3(double, const TPM &)
Definition: SPM.cpp:131
SPM & operator=(const SPM &)=default