TBTK
Need a break? Support the development by playing Polarity Puzzles
DualIndex.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_DUAL_INDEX
25 #define COM_DAFER45_TBTK_DUAL_INDEX
26 
27 #include "TBTK/Index.h"
28 #include "TBTK/TBTKMacros.h"
29 
30 #include <vector>
31 
32 namespace TBTK{
33 
34 class DualIndex : public Index, public std::vector<double>{
35 public:
37  DualIndex(
38  const Index &index,
39  const std::vector<double> &continuousIndex
40  );
41 
43  ~DualIndex();
44 
46 // const std::vector<double>& getContinuousIndex() const;
47 private:
48 // const std::vector<double> continuousIndex;
49 };
50 
51 inline DualIndex::DualIndex(
52  const Index &index,
53  const std::vector<double> &continuousIndex
54 ) :
55  Index(index),
56 // continuousIndex(continuousIndex)
57  std::vector<double>(continuousIndex)
58 {
59  TBTKAssert(
60  index.getSize() == continuousIndex.size(),
61  "DualIndex::DualIndex()",
62  "Incompatible index sizes.",
63  "'index' and 'continuousIndex' must have the same number of"
64  << " components."
65  );
66 }
67 
68 inline DualIndex::~DualIndex(){
69 }
70 
71 /*inline const std::vector<double>& DualIndex::getContinuousIndex() const{
72  return continuousIndex;
73 }*/
74 
75 }; //End of namespace TBTK
76 
77 #endif
78 
Physical index.
Precompiler macros.
Definition: Boolean.h:32