TBTK
UnitCell.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_UNIT_CELL
24 #define COM_DAFER45_TBTK_UNIT_CELL
25 
26 #include "TBTK/StateSet.h"
27 
28 namespace TBTK{
29 
30 class UnitCell : public StateSet{
31 public:
33  UnitCell(std::initializer_list<std::initializer_list<double>> latticeVectors, bool isOwner = true);
34 
36  UnitCell(const std::vector<std::vector<double>> &latticeVectors, bool isOwner = true);
37 
39  ~UnitCell();
40 
42  int getNumLatticeVectors() const;
43 
45  const std::vector<double>& getLatticeVector(int n) const;
46 
48  const std::vector<std::vector<double>>& getLatticeVectors() const;
49 private:
51  std::vector<std::vector<double>> latticeVectors;
52 };
53 
54 inline int UnitCell::getNumLatticeVectors() const{
55  return latticeVectors.size();
56 }
57 
58 inline const std::vector<double>& UnitCell::getLatticeVector(int n) const{
59  return latticeVectors.at(n);
60 }
61 
62 inline const std::vector<std::vector<double>>& UnitCell::getLatticeVectors() const{
63  return latticeVectors;
64 }
65 
66 }; //End of namespace TBTK
67 
68 #endif
UnitCell(std::initializer_list< std::initializer_list< double >> latticeVectors, bool isOwner=true)
const std::vector< std::vector< double > > & getLatticeVectors() const
Definition: UnitCell.h:62
Container for States.
Definition: UnitCell.h:30
Definition: ModelFactory.h:35
int getNumLatticeVectors() const
Definition: UnitCell.h:54
Definition: StateSet.h:30
const std::vector< double > & getLatticeVector(int n) const
Definition: UnitCell.h:58