Regular grids divide space in evenly sized portions or cells. A coordinate system over integers can thus be defined, in addition to that of the space in which the grid is embedded.
A type G
satisfies RegularGrid
requirements if given g
, a possibly const instance of G
:
g.resolution()
returns the side length of all grid N-dimensional cells as a double
;x
of type Eigen::Vector<double, NDim>
, g.cell_at(x)
returns grid cell coordinates as an Eigen::Vector<int, NDim1>
value;p
of Eigen::Vector<double, NDim>
type, g.cell_at(p)
returns grid cell coordinates as an Eigen::Vector<int, NDim>
value;xi
of type Eigen::Vector<int, NDim>
, g.coordinates_at(xi)
returns embedding space coordinates as an Eigen::Vector<double, NDim>
value;r
of grid cell coordinates of Eigen::Vector<int, NDim>
type, g.coordinates_for(r)
returns a range of embedding space coordinates as Eigen::Vector<double, NDim>
values.