TBTK
SpinMatrix.h
1 /* Copyright 2017 Kristofer Björnson
2  *
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
8  *
9  * Unless required by applicable law or agreed to in writing, software
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
41  SpinMatrix(std::complex<double> value);
42
44  ~SpinMatrix();
45
48  SpinMatrix& operator=(std::complex<double> value);
49
51  SpinMatrix& operator+=(const SpinMatrix &spinMatrix);
52
54  SpinMatrix& operator-=(const SpinMatrix &spinMatrix);
55
57  double getDensity() const;
58
60  Vector3d getDirection() const;
61 private:
62 };
63
64 }; //End namespace TBTK
65
66 #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