TBTK
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 
34 class WaveFunctions : public AbstractProperty<std::complex<double>>{
35 public:
37 // WaveFunction(int dimensions, const int *ranges);
38 
40 // WaveFunction(int dimensions, const int *ranges, const double *data);
41 
43 /* WaveFunctions(
44  const IndexTree &indexTree,
45  const std::initializer_list<unsigned int> &states
46  );*/
47 
57  const IndexTree &indexTree,
58  const std::vector<unsigned int> &states
59  );
60 
62 /* WaveFunctions(
63  const IndexTree &indexTree,
64  const std::initializer_list<unsigned int> &states,
65  const std::complex<double> *data
66  );*/
67 
80  const IndexTree &indexTree,
81  const std::vector<unsigned int> &states,
82  const std::complex<double> *data
83  );
84 
86 // WaveFunctions(const WaveFunctions &waveFunctions);
87 
89 // WaveFunctions(WaveFunctions &&waveFunctions);
90 
96  WaveFunctions(const std::string &serialization, Mode mode);
97 
99 // ~WaveFunctions();
100 
102 // WaveFunctions& operator=(const WaveFunctions &rhs);
103 
105 // WaveFunctions& operator=(WaveFunctions &&rhs);
106 
111  const std::vector<unsigned int>& getStates() const;
112 
114  const std::complex<double>& operator()(
115  const Index &index,
116  unsigned int state
117  ) const;
118 
120  std::complex<double>& operator()(
121  const Index &index,
122  unsigned int state
123  );
124 
128  double getMinAbs() const;
129 
133  double getMaxAbs() const;
134 
138  double getMinArg() const;
139 
143  double getMaxArg() const;
144 
146  virtual std::string serialize(Mode mode) const;
147 private:
150  bool isContinuous;
151 
153  std::vector<unsigned int> states;
154 };
155 
156 inline const std::vector<unsigned int>& WaveFunctions::getStates() const{
157  return states;
158 }
159 
160 }; //End namespace Property
161 }; //End namespace TBTK
162 
163 #endif
const std::vector< unsigned int > & getStates() const
Definition: WaveFunctions.h:156
const std::complex< double > & operator()(const Index &index, unsigned int state) const
Abstract Property class.
Definition: AbstractProperty.h:95
Data structure for mapping physical indices to linear indices.
Definition: IndexTree.h:34
Flexible physical index.
Definition: Index.h:69
Definition: ModelFactory.h:35
Property container for wave function.
Definition: WaveFunctions.h:34
WaveFunctions(const IndexTree &indexTree, const std::vector< unsigned int > &states)
Mode
Definition: Serializable.h:44
virtual std::string serialize(Mode mode) const