oILAB
Loading...
Searching...
No Matches
LatticeDirection.cpp
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_LatticeDirection_cpp_
8#define gbLAB_LatticeDirection_cpp_
9
10#include "../../include/Lattices/LatticeModule.h"
11namespace oILAB {
12template <int dim>
14 : /* base init */ LatticeVector<dim>(
15 ((v.squaredNorm() == 0)
16 ? v
17 : (v / IntegerMath<IntScalarType>::gcd(v)).eval()),
18 v.lattice) {}
19
20template <int dim>
22 const Lattice<dim> &lat)
23 : /* base init */ LatticeVector<dim>(
24 ((v.squaredNorm() == 0)
25 ? v
26 : (v / IntegerMath<IntScalarType>::gcd(v)).eval()),
27 lat) {}
28
29template <int dim>
30basic_ostream<char> &operator<<(basic_ostream<char> &s,
31 const LatticeDirection<dim> &m) {
32 return s << m.latticeVector().transpose();
33 }
34
35 template struct LatticeDirection<1>;
36 template basic_ostream<char>& operator<<(basic_ostream<char>& s, const LatticeDirection<1>& m);
37 template struct LatticeDirection<2>;
38 template basic_ostream<char>& operator<<(basic_ostream<char>& s, const LatticeDirection<2>& m);
39 template struct LatticeDirection<3>;
40 template basic_ostream<char>& operator<<(basic_ostream<char>& s, const LatticeDirection<3>& m);
41 template struct LatticeDirection<4>;
42 template basic_ostream<char>& operator<<(basic_ostream<char>& s, const LatticeDirection<4>& m);
43 template struct LatticeDirection<5>;
44 template basic_ostream<char>& operator<<(basic_ostream<char>& s, const LatticeDirection<5>& m);
45
46 } // namespace oILAB
47#endif
Lattice class.
Definition Lattice.h:31
LatticeVector class.
basic_ostream< char > & operator<<(basic_ostream< char > &s, const LatticeDirection< dim > &m)
LatticeDirection class.
typename LatticeCore< dim >::VectorDimI VectorDimI
typename LatticeCore< dim >::IntScalarType IntScalarType
LatticeDirection(const LatticeVector< dim > &v)
const LatticeVector< dim > & latticeVector() const