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 
44  const IndexTree &indexTree,
45  const std::initializer_list<unsigned int> &states
46  );
47 
50  const IndexTree &indexTree,
51  const std::vector<unsigned int> &states
52  );
53 
56  const IndexTree &indexTree,
57  const std::initializer_list<unsigned int> &states,
58  const std::complex<double> *data
59  );
60 
63  const IndexTree &indexTree,
64  const std::vector<unsigned int> &states,
65  const std::complex<double> *data
66  );
67 
69  WaveFunctions(const WaveFunctions &waveFunctions);
70 
72  WaveFunctions(WaveFunctions &&waveFunctions);
73 
76  WaveFunctions(const std::string &serialization, Mode mode);
77 
80 
83 
86 
89  const std::vector<unsigned int>& getStates() const;
90 
92  const std::complex<double>& operator()(
93  const Index &index,
94  unsigned int state
95  ) const;
96 
98  std::complex<double>& operator()(
99  const Index &index,
100  unsigned int state
101  );
102 
104  double getMinAbs() const;
105 
107  double getMaxAbs() const;
108 
110  double getMinArg() const;
111 
113  double getMaxArg() const;
114 
116  virtual std::string serialize(Mode mode) const;
117 private:
120  bool isContinuous;
121 
123  std::vector<unsigned int> states;
124 };
125 
126 inline const std::vector<unsigned int>& WaveFunctions::getStates() const{
127  return states;
128 }
129 
130 }; //End namespace Property
131 }; //End namespace TBTK
132 
133 #endif
WaveFunctions(const IndexTree &indexTree, const std::initializer_list< unsigned int > &states)
const std::vector< unsigned int > & getStates() const
Definition: WaveFunctions.h:126
const std::complex< double > & operator()(const Index &index, unsigned int state) const
Abstract Property class.
Definition: AbstractProperty.h:41
Data structure for mapping physical indices to a linear index.
Definition: IndexTree.h:34
Flexible physical index.
Definition: Index.h:70
Definition: ModelFactory.h:35
Property container for wave function.
Definition: WaveFunctions.h:34
WaveFunctions & operator=(const WaveFunctions &rhs)
Mode
Definition: Serializable.h:44
virtual std::string serialize(Mode mode) const