Beluga named requirements: DenseGrid2
Dense grids support random, indexed access to each cell. These grids have a finite extent and thus can hold cell data in finite memory. Dense grids are regular grids, meaning they satisfy Beluga named requirements: RegularGrid requirements.
A type G
satisfies DenseGrid2
requirements if it satisfies Beluga named requirements: RegularGrid and given g
a possibly const instance of G
:
g.width()
returns the grid width, in grid cells along the grid x-axis, as anstd::size_t
value.g.height()
returns the grid height, in grid cells along the grid y-axis, as anstd::size_t
value.given possibly const grid cell coordinates
xi
andyi
of typeint
,g.contains(xi, yi)
checks whether such cell is included in the grid;given possibly const grid cell coordinates
pi
ofEigen::Vector2i
type,g.contains(p)
checks whether such cell is included in the grid;given possibly const grid cell coordinates
xi
andyi
of typeint
,g.index_at(xi, yi)
retrieves the corresponding cell index of some type;given possibly const grid cell coordinates
pi
ofEigen::Vector2i
type,g.index_at(pi)
retrieves the corresponding cell index of some type;given possibly const grid cell coordinates
xi
andyi
of typeint
,g.data_at(xi, yi)
optionally returns cell data, if cell is included;given possibly const grid cell coordinates
pi
ofEigen::Vector2i
type,g.data_at(p)
optionally returns cell data, if cell is included;given possibly const grid cell index
i
of some type,g.data_at(i)
optionally returns cell data, if cell is included;given possibly const embedding space coordinates
x
andy
of typedouble
,g.data_near(x, y)
optionally returns cell data, if cell is included;given possibly const embedding space coordinates
p
ofEigen::Vector2d
type,g.data_near(p)
optionally returns cell data, if cell is included;given possibly const grid cell coordinates
xi
andyi
of typeint
,g.neighborhood4(xi, yi)
computes the cell 4-connected neighborhood as a range ofEigen::Vector2i
type;given possibly const grid cell coordinates
pi
ofEigen::Vector2i
type,g.neighborhood4(p)
computes the cell 4-connected neighborhood as a range ofEigen::Vector2i
type.