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 <LatticeModule.h>
11namespace gbLAB
12{
13 template <int dim>
15 /* base init */ LatticeVector<dim>(((v.squaredNorm()==0)? v : (v/IntegerMath<IntScalarType>::gcd(v)).eval()),v.lattice)
16 {
17 }
18
19 template <int dim>
21 const Lattice<dim>& lat) :
22 /* base init */ LatticeVector<dim>(((v.squaredNorm()==0)? v : (v/IntegerMath<IntScalarType>::gcd(v)).eval()),lat)
23 {
24 }
25
26 template<int dim>
27 basic_ostream<char>& operator<<(basic_ostream<char>& s, const LatticeDirection<dim>& m)
28 {
29 return s<<m.latticeVector().transpose();
30 }
31
32 template struct LatticeDirection<1>;
33 template basic_ostream<char>& operator<<(basic_ostream<char>& s, const LatticeDirection<1>& m);
34 template struct LatticeDirection<2>;
35 template basic_ostream<char>& operator<<(basic_ostream<char>& s, const LatticeDirection<2>& m);
36 template struct LatticeDirection<3>;
37 template basic_ostream<char>& operator<<(basic_ostream<char>& s, const LatticeDirection<3>& m);
38 template struct LatticeDirection<4>;
39 template basic_ostream<char>& operator<<(basic_ostream<char>& s, const LatticeDirection<4>& m);
40 template struct LatticeDirection<5>;
41 template basic_ostream<char>& operator<<(basic_ostream<char>& s, const LatticeDirection<5>& m);
42
43} // end namespace
44#endif
Lattice class.
Definition Lattice.h:34
LatticeVector class.
basic_ostream< char > & operator<<(basic_ostream< char > &s, const LatticeDirection< dim > &m)
LatticeDirection class.
LatticeDirection(const LatticeVector< dim > &v)
const LatticeVector< dim > & latticeVector() const
typename LatticeCore< dim >::IntScalarType IntScalarType
typename LatticeCore< dim >::VectorDimI VectorDimI