TBTK
Need a break? Support the development by playing Polarity Puzzles
WaveFunctions.h
Go to the documentation of this file.
1 /* Copyright 2016 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_WAVE_FUNCTIONS
24 #define COM_DAFER45_TBTK_WAVE_FUNCTIONS
25 
26 #include "TBTK/Property/AbstractProperty.h"
27 
28 #include <complex>
29 
30 namespace TBTK{
31 namespace Property{
32 
45 class WaveFunctions : public AbstractProperty<std::complex<double>>{
46 public:
48  WaveFunctions();
49 
59  const IndexTree &indexTree,
60  const std::vector<unsigned int> &states
61  );
62 
75  const IndexTree &indexTree,
76  const std::vector<unsigned int> &states,
77  const std::complex<double> *data
78  );
79 
85  WaveFunctions(const std::string &serialization, Mode mode);
86 
91  const std::vector<unsigned int>& getStates() const;
92 
94  const std::complex<double>& operator()(
95  const Index &index,
96  unsigned int state
97  ) const;
98 
100  std::complex<double>& operator()(
101  const Index &index,
102  unsigned int state
103  );
104 
108  double getMinAbs() const;
109 
113  double getMaxAbs() const;
114 
118  double getMinArg() const;
119 
123  double getMaxArg() const;
124 
126  virtual std::string toString() const;
127 
129  virtual std::string serialize(Mode mode) const;
130 private:
133  bool isContinuous;
134 
136  std::vector<unsigned int> states;
137 };
138 
140 }
141 
142 inline const std::vector<unsigned int>& WaveFunctions::getStates() const{
143  return states;
144 }
145 
146 }; //End namespace Property
147 }; //End namespace TBTK
148 
149 #endif
WaveFunctions()
Definition: WaveFunctions.h:139
virtual std::string serialize(Mode mode) const
Abstract Property class.
Definition: AbstractProperty.h:101
Data structure for mapping physical indices to linear indices.
Definition: IndexTree.h:35
Physical index.
Definition: Index.h:44
Definition: Boolean.h:32
Property container for wave function.
Definition: WaveFunctions.h:45
Mode
Definition: Serializable.h:47
const std::vector< unsigned int > & getStates() const
Definition: WaveFunctions.h:142
virtual std::string toString() const
const std::complex< double > & operator()(const Index &index, unsigned int state) const