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
TBTK::Property::WaveFunctions::getMinArg
double getMinArg() const
TBTK::Property::WaveFunctions::toString
virtual std::string toString() const
TBTK::Property::WaveFunctions::getMaxAbs
double getMaxAbs() const
TBTK::Property::WaveFunctions::getStates
const std::vector< unsigned int > & getStates() const
Definition: WaveFunctions.h:142
TBTK::Property::WaveFunctions::operator()
const std::complex< double > & operator()(const Index &index, unsigned int state) const
TBTK::Property::WaveFunctions::WaveFunctions
WaveFunctions()
Definition: WaveFunctions.h:139
TBTK::Property::WaveFunctions::getMaxArg
double getMaxArg() const
TBTK::IndexTree
Data structure for mapping physical indices to linear indices.
Definition: IndexTree.h:35
TBTK::Property::AbstractProperty
Abstract Property class.
Definition: AbstractProperty.h:101
TBTK::Property::WaveFunctions::serialize
virtual std::string serialize(Mode mode) const
TBTK::Property::WaveFunctions::getMinAbs
double getMinAbs() const
TBTK::Serializable::Mode
Mode
Definition: Serializable.h:47
TBTK::Index
Physical index.
Definition: Index.h:44
TBTK::Property::WaveFunctions
Property container for wave function.
Definition: WaveFunctions.h:45