TBTK
SpinMatrix.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 
23 #ifndef COM_DAFER45_TBTK_SPIN_MATRIX
24 #define COM_DAFER45_TBTK_SPIN_MATRIX
25 
26 #include "TBTK/Matrix.h"
27 #include "TBTK/Vector3d.h"
28 
29 #include <complex>
30 
31 namespace TBTK{
32 
33 class SpinMatrix : public Matrix<std::complex<double>, 2, 2>{
34 public:
36  SpinMatrix();
37 
39  ~SpinMatrix();
40 
43  SpinMatrix& operator=(std::complex<double> value);
44 
46  SpinMatrix& operator+=(const SpinMatrix &spinMatrix);
47 
49  SpinMatrix& operator-=(const SpinMatrix &spinMatrix);
50 
52  double getDensity() const;
53 
55  Vector3d getDirection() const;
56 private:
57 };
58 
59 }; //End namespace TBTK
60 
61 #endif
SpinMatrix & operator+=(const SpinMatrix &spinMatrix)
SpinMatrix & operator-=(const SpinMatrix &spinMatrix)
Three-dimensional vector with components of double type.
SpinMatrix & operator=(std::complex< double > value)
Vector3d getDirection() const
Custom matrix.
Definition: Matrix.h:33
Definition: Vector3d.h:33
Definition: ModelFactory.h:35
Definition: SpinMatrix.h:33
double getDensity() const