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_tvalue.g.height()returns the grid height, in grid cells along the grid y-axis, as anstd::size_tvalue.given possibly const grid cell coordinates
xiandyiof typeint,g.contains(xi, yi)checks whether such cell is included in the grid;given possibly const grid cell coordinates
piofEigen::Vector2itype,g.contains(p)checks whether such cell is included in the grid;given possibly const grid cell coordinates
xiandyiof typeint,g.index_at(xi, yi)retrieves the corresponding cell index of some type;given possibly const grid cell coordinates
piofEigen::Vector2itype,g.index_at(pi)retrieves the corresponding cell index of some type;given possibly const grid cell coordinates
xiandyiof typeint,g.data_at(xi, yi)optionally returns cell data, if cell is included;given possibly const grid cell coordinates
piofEigen::Vector2itype,g.data_at(p)optionally returns cell data, if cell is included;given possibly const grid cell index
iof some type,g.data_at(i)optionally returns cell data, if cell is included;given possibly const embedding space coordinates
xandyof typedouble,g.data_near(x, y)optionally returns cell data, if cell is included;given possibly const embedding space coordinates
pofEigen::Vector2dtype,g.data_near(p)optionally returns cell data, if cell is included;given possibly const grid cell coordinates
xiandyiof typeint,g.neighborhood4(xi, yi)computes the cell 4-connected neighborhood as a range ofEigen::Vector2itype;given possibly const grid cell coordinates
piofEigen::Vector2itype,g.neighborhood4(p)computes the cell 4-connected neighborhood as a range ofEigen::Vector2itype.