TBTK
Need a break? Support the development by playing Polarity Puzzles
FockStateMap.h
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 
17 
24 #ifndef COM_DAFER45_TBTK_FOCK_STATE_MAP
25 #define COM_DAFER45_TBTK_FOCK_STATE_MAP
26 
27 #include "TBTK/FockState.h"
28 
29 namespace TBTK{
30 namespace FockStateMap{
31 
32 template<typename BIT_REGISTER>
33 class FockStateMap{
34 public:
36  FockStateMap(unsigned int exponentialDimension);
37 
39  virtual ~FockStateMap();
40 
42  virtual unsigned int getBasisSize() const = 0;
43 
45  virtual unsigned int getBasisIndex(
46  const FockState<BIT_REGISTER> &fockState
47  ) const = 0;
48 
50  virtual FockState<BIT_REGISTER> getFockState(
51  unsigned int index
52  ) const = 0;
53 
55  unsigned int getExponentialDimension() const;
56 private:
57  unsigned int exponentialDimension;
58 };
59 
60 template<typename BIT_REGISTER>
61 FockStateMap<BIT_REGISTER>::FockStateMap(unsigned int exponentialDimension){
62  this->exponentialDimension = exponentialDimension;
63 }
64 
65 template<typename BIT_REGISTER>
66 FockStateMap<BIT_REGISTER>::~FockStateMap(){
67 }
68 
69 template<typename BIT_REGISTER>
70 unsigned int FockStateMap<BIT_REGISTER>::getExponentialDimension() const{
71  return exponentialDimension;
72 }
73 
74 }; //End of namespace FockStateMap
75 }; //End of namespace TBTK
76 
77 #endif
78 
Definition: Boolean.h:32