oILAB
Loading...
Searching...
No Matches
RationalReciprocalLatticeDirection.h
Go to the documentation of this file.
1/* This file is part of gbLAB.
2 *
3 * gbLAB is distributed without any warranty under the MIT License.
4 */
5
6
7#ifndef gbLAB_RationalReciprocalLatticeDirection_h_
8#define gbLAB_RationalReciprocalLatticeDirection_h_
9
10#include "LatticeVector.h"
12#include "../Math/Rational.h"
13#include "../Math/BestRationalApproximation.h"
14
15namespace oILAB {
16template <int dim> struct RationalReciprocalLatticeDirection {
22
25
26public:
28 const Rational<IntScalarType> &_rat,
34 const RationalReciprocalLatticeDirection<dim> &other) = default;
37 VectorDimD cartesian() const;
40 operator*(const IntScalarType &scalar) const;
42 operator/(const IntScalarType &scalar) const;
48 operator+(const ReciprocalLatticeVector<dim> &other) const;
50 operator-(const ReciprocalLatticeVector<dim> &other) const;
51 double squaredNorm() const;
52
53 };
54
55 template<int dim>
57
58 } // namespace oILAB
59#endif
LatticeVector class.
LatticeVector< dim > operator*(const typename LatticeVector< dim >::IntScalarType &scalar, const LatticeVector< dim > &L)
Eigen::Matrix< IntScalarType, dim, 1 > VectorDimI
Definition LatticeCore.h:23
long long int IntScalarType
Definition LatticeCore.h:22
Eigen::Matrix< IntScalarType, dim, dim > MatrixDimI
Definition LatticeCore.h:24
Eigen::Matrix< double, dim, 1 > VectorDimD
Definition LatticeCore.h:20
Eigen::Matrix< double, dim, dim > MatrixDimD
Definition LatticeCore.h:21
RationalReciprocalLatticeDirection< dim > operator+(const RationalReciprocalLatticeDirection< dim > &other) const
RationalReciprocalLatticeDirection< dim > operator/(const IntScalarType &scalar) const
RationalReciprocalLatticeDirection< dim > operator-(const RationalReciprocalLatticeDirection< dim > &other) const
Rational< IntScalarType > dot(const LatticeVector< dim > &other) const
RationalReciprocalLatticeDirection< dim > operator*(const IntScalarType &scalar) const
RationalReciprocalLatticeDirection(const RationalReciprocalLatticeDirection< dim > &other)=default
RationalReciprocalLatticeDirection(RationalReciprocalLatticeDirection< dim > &&other)=default