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 "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();
37 
39  int getNumLatticeVectors() const;
40 
42  const std::vector<double>& getLatticeVector(int n) const;
43 
45  const std::vector<std::vector<double>>& getLatticeVectors() const;
46 private:
48  std::vector<std::vector<double>> latticeVectors;
49 };
50 
51 inline int UnitCell::getNumLatticeVectors() const{
52  return latticeVectors.size();
53 }
54 
55 inline const std::vector<double>& UnitCell::getLatticeVector(int n) const{
56  return latticeVectors.at(n);
57 }
58 
59 inline const std::vector<std::vector<double>>& UnitCell::getLatticeVectors() const{
60  return latticeVectors;
61 }
62 
63 }; //End of namespace TBTK
64 
65 #endif
UnitCell(std::initializer_list< std::initializer_list< double >> latticeVectors, bool isOwner=true)
Definition: UnitCell.cpp:28
~UnitCell()
Definition: UnitCell.cpp:57
const std::vector< std::vector< double > > & getLatticeVectors() const
Definition: UnitCell.h:59
Container for States.
Definition: UnitCell.h:30
Definition: AbstractOperator.h:26
int getNumLatticeVectors() const
Definition: UnitCell.h:51
Definition: StateSet.h:30
const std::vector< double > & getLatticeVector(int n) const
Definition: UnitCell.h:55