15 template<
class Coordinate_>
18 using Coordinate = Coordinate_;
32 Direction() {
for (
int i = 0; i < DIY_MAX_DIM; ++i) (*
this)[i] = 0; }
35 for (
int i = 0; i < DIY_MAX_DIM; ++i) (*
this)[i] = 0;
36 if (dir & DIY_X0) (*this)[0] -= 1;
37 if (dir & DIY_X1) (*this)[0] += 1;
38 if (dir & DIY_Y0) (*this)[1] -= 1;
39 if (dir & DIY_Y1) (*this)[1] += 1;
40 if (dir & DIY_Z0) (*this)[2] -= 1;
41 if (dir & DIY_Z1) (*this)[2] += 1;
42 if (dir & DIY_T0) (*this)[3] -= 1;
43 if (dir & DIY_T1) (*this)[3] += 1;
49 for (
int i = 0; i < DIY_MAX_DIM; ++i)
50 if ((*
this)[i] != y[i])
return false;
58 for (
int i = 0; i < DIY_MAX_DIM; ++i)
60 if ((*
this)[i] < y[i])
return true;
61 if ((*
this)[i] > y[i])
return false;
68 template<
class Bounds_>
71 using type =
typename Bounds_::Coordinate;
77 {
return x.gid < y.gid; }
82 {
return x.gid == y.gid; }
diy::DiscreteBounds interval(int from, int to)
Helper to create a 1-dimensional discrete domain with the specified extents.
Definition: types.hpp:28