TBTK
Need a break? Support the development by playing Polarity Puzzles
BravaisLattice.h
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 
17 
24 #ifndef COM_DAFER45_TBTK_BRAVAIS_LATTICE
25 #define COM_DAFER45_TBTK_BRAVAIS_LATTICE
26 
27 #include <vector>
28 
29 namespace TBTK{
30 namespace Lattice{
31 
32 class BravaisLattice{
33 public:
35  BravaisLattice();
36 
38  ~BravaisLattice();
39 
41  inline int getNumLatticeVectors() const;
42 
44  inline int getNumAdditionalSites() const;
45 
47  const std::vector<double>& getLatticeVector(int n) const;
48 
50  const std::vector<double>& getAdditionalSite(int n) const;
51 
53  const std::vector<std::vector<double>>& getLatticeVectors() const;
54 
56  const std::vector<std::vector<double>>& getAdditionalSites() const;
57 
60  virtual void makePrimitive();
61 protected:
63  void setLatticeVectors(const std::vector<std::vector<double>> &latticeVectors);
64 
66  void setAdditionalSites(const std::vector<std::vector<double>> &additionalSites);
67 private:
69  std::vector<std::vector<double>> latticeVectors;
70 
72  std::vector<std::vector<double>> additionalSites;
73 };
74 
75 inline int BravaisLattice::getNumLatticeVectors() const{
76  return latticeVectors.size();
77 }
78 
79 inline int BravaisLattice::getNumAdditionalSites() const{
80  return additionalSites.size();
81 }
82 
83 inline const std::vector<double>& BravaisLattice::getLatticeVector(int n) const{
84  return latticeVectors.at(n);
85 }
86 
87 inline const std::vector<double>& BravaisLattice::getAdditionalSite(int n) const{
88  return additionalSites.at(n);
89 }
90 
91 inline const std::vector<std::vector<double>>& BravaisLattice::getLatticeVectors() const{
92  return latticeVectors;
93 }
94 
95 inline const std::vector<std::vector<double>>& BravaisLattice::getAdditionalSites() const{
96  return additionalSites;
97 }
98 
99 }; //End of namespace Lattice
100 }; //End of namespace TBTK
101 
102 #endif
103 
Definition: Boolean.h:32