Dense 2D grid base type.
More...
#include <dense_grid.hpp>
|
| bool | contains (const Eigen::Vector2i &pi) const |
| | Checks if a cell is included in the grid. More...
|
| |
| bool | contains (int xi, int yi) const |
| | Checks if a cell is included in the grid. More...
|
| |
| auto | data_at (const Eigen::Vector2i &pi) const |
| | Gets cell data, if included. More...
|
| |
| auto | data_at (int xi, int yi) const |
| | Gets cell data, if included. More...
|
| |
| auto | data_near (const Eigen::Vector2d &p) const |
| | Gets nearest cell data, if included. More...
|
| |
| auto | data_near (double x, double y) const |
| | Gets nearest cell data, if included. More...
|
| |
| auto | neighborhood4 (const Eigen::Vector2i &pi) const |
| | Computes 4-connected neighborhood for cell. More...
|
| |
| auto | neighborhood4 (int xi, int yi) const |
| | Computes 4-connected neighborhood for cell. More...
|
| |
| Eigen::Vector< int, NDim > | cell_near (const Eigen::Vector< double, NDim > &p) const |
| | Compute nearest grid cell coordinates given plane coordinates. More...
|
| |
| Eigen::Vector< double, NDim > | coordinates_at (const Eigen::Vector< int, NDim > &pi) const |
| | Compute plane coordinates given grid cell coordinates. More...
|
| |
| template<class Range > |
| auto | coordinates_for (Range &&cells) const |
| | Compute plane coordinates given a range of cell coordinates. More...
|
| |
template<typename Derived>
class beluga::BaseDenseGrid2< Derived >
Dense 2D grid base type.
When instantiated, it satisfies Beluga named requirements: DenseGrid2.
- Template Parameters
-
| Derived | Concrete dense grid type. It must define Derived::width(), Derived::height(), Derived::resolution(), Derived::data_at(index), and Derived::index_at(int, int) as described in Beluga named requirements: DenseGrid2. |
Definition at line 83 of file dense_grid.hpp.
◆ contains() [1/2]
template<typename Derived >
Checks if a cell is included in the grid.
- Parameters
-
Definition at line 100 of file dense_grid.hpp.
◆ contains() [2/2]
template<typename Derived >
Checks if a cell is included in the grid.
- Parameters
-
| xi | Grid cell x-axis coordinate. |
| yi | Grid cell y-axis coordinate. |
Definition at line 90 of file dense_grid.hpp.
◆ data_at() [1/2]
template<typename Derived >
Gets cell data, if included.
- Parameters
-
- Returns
- Cell data if included,
std::nullopt otherwise.
Definition at line 118 of file dense_grid.hpp.
◆ data_at() [2/2]
template<typename Derived >
Gets cell data, if included.
- Parameters
-
| xi | Grid cell x-axis coordinate. |
| yi | Grid cell y-axis coordinate. |
- Returns
- Cell data if included,
std::nullopt otherwise.
Definition at line 108 of file dense_grid.hpp.
◆ data_near() [1/2]
template<typename Derived >
Gets nearest cell data, if included.
- Parameters
-
- Returns
- Cell data if included,
std::nullopt otherwise.
Definition at line 135 of file dense_grid.hpp.
◆ data_near() [2/2]
template<typename Derived >
Gets nearest cell data, if included.
- Parameters
-
| x | Plane x-axis coordinate. |
| y | Plane y-axis coordinate. |
- Returns
- Cell data if included,
std::nullopt otherwise.
Definition at line 126 of file dense_grid.hpp.
◆ neighborhood4() [1/2]
template<typename Derived >
Computes 4-connected neighborhood for cell.
- Parameters
-
- Returns
- range of neighbor cells.
Definition at line 165 of file dense_grid.hpp.
◆ neighborhood4() [2/2]
template<typename Derived >
Computes 4-connected neighborhood for cell.
- Parameters
-
| xi | Grid cell x-axis coordinate. |
| yi | Grid cell y-axis coordinate. |
- Returns
- range of neighbor cells.
Definition at line 143 of file dense_grid.hpp.
The documentation for this class was generated from the following file: