TBTK
SelfEnergy.h
Go to the documentation of this file.
1 /* Copyright 2017 Kristofer Bj√∂rnson
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
23 #ifndef COM_DAFER45_TBTK_SELF_ENERGY
24 #define COM_DAFER45_TBTK_SELF_ENERGY
25 
26 #include "TBTK/Property/AbstractProperty.h"
27 #include "TBTK/TBTKMacros.h"
28 
29 #include <complex>
30 #include <vector>
31 
32 namespace TBTK{
33 namespace Property{
34 
36 class SelfEnergy : public AbstractProperty<std::complex<double>>{
37 public:
39  SelfEnergy();
40 
42  SelfEnergy(
43  const IndexTree &indexTree,
44  double lowerBound,
45  double upperBound,
46  unsigned int resolution
47  );
48 
50  SelfEnergy(
51  const IndexTree &indexTree,
52  double lowerBound,
53  double upperBound,
54  unsigned int resolution,
55  const std::complex<double> *data
56  );
57 
59  SelfEnergy(const SelfEnergy &selfEnergy);
60 
62  SelfEnergy(SelfEnergy &&selfEnergy);
63 
65  ~SelfEnergy();
66 
68  double getLowerBound() const;
69 
71  double getUpperBound() const;
72 
74  unsigned int getResolution() const;
75 
77  const SelfEnergy& operator=(const SelfEnergy &rhs);
78 
80  const SelfEnergy& operator=(SelfEnergy &&rhs);
81 private:
83  double lowerBound;
84 
86  double upperBound;
87 
89  unsigned int resolution;
90 };
91 
92 inline double SelfEnergy::getLowerBound() const{
93  return lowerBound;
94 }
95 
96 inline double SelfEnergy::getUpperBound() const{
97  return upperBound;
98 }
99 
100 inline unsigned int SelfEnergy::getResolution() const{
101  return resolution;
102 }
103 
105  const SelfEnergy &rhs
106 ){
107  if(this != &rhs){
109 
110  lowerBound = rhs.lowerBound;
111  upperBound = rhs.upperBound;
112  resolution = rhs.resolution;
113  }
114 
115  return *this;
116 }
117 
119  SelfEnergy &&rhs
120 ){
121  if(this != &rhs){
122  AbstractProperty::operator=(std::move(rhs));
123 
124  lowerBound = rhs.lowerBound;
125  upperBound = rhs.upperBound;
126  resolution = rhs.resolution;
127  }
128 
129  return *this;
130 }
131 
132 }; //End namespace Property
133 }; //End namespace TBTK
134 
135 #endif
Property container for self-energy.
Definition: SelfEnergy.h:36
Precompiler macros.
double getUpperBound() const
Definition: SelfEnergy.h:96
const SelfEnergy & operator=(const SelfEnergy &rhs)
Definition: SelfEnergy.h:104
Abstract Property class.
Definition: AbstractProperty.h:41
Data structure for mapping physical indices to a linear index.
Definition: IndexTree.h:34
double getLowerBound() const
Definition: SelfEnergy.h:92
Definition: ModelFactory.h:35
AbstractProperty & operator=(const AbstractProperty &abstractProperty)
Definition: AbstractProperty.h:905
unsigned int getResolution() const
Definition: SelfEnergy.h:100