Generic N dimensional sparse value regular grid. More...
#include <sparse_value_grid.hpp>

Public Types | |
| using | key_type = typename map_type::key_type |
| Key type for the key-value pairs. More... | |
| using | map_type = MapType |
| Underlying associative container. More... | |
| using | mapped_type = typename map_type::mapped_type |
| Value type of the key-value pairs stored in the data. More... | |
Public Member Functions | |
| const map_type & | data () const |
| Gets grid data. More... | |
| std::optional< mapped_type > | data_at (const Eigen::Vector< int, NDim > &cell_index) const |
| Gets grid data at cell_index or std::nullopt if it's not present. More... | |
| std::optional< mapped_type > | data_near (const Eigen::Vector< double, NDim > &coordinates) const |
| Gets grid data at real coordinates 'coordinates' or std::nullopt if it's not present. More... | |
| double | resolution () const |
| Gets grid resolution. More... | |
| std::size_t | size () const |
| Gets grid size (ie. number of grid cells). More... | |
| SparseValueGrid ()=default | |
| Construct without data and with a 1 cell/meter resolution. More... | |
| SparseValueGrid (map_type data, double resolution=1.) | |
| Constructs the grid. More... | |
Public Member Functions inherited from beluga::BaseRegularGrid< SparseValueGrid< MapType, NDim >, NDim > | |
| 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... | |
| auto | coordinates_for (Range &&cells) const |
| Compute plane coordinates given a range of cell coordinates. More... | |
Private Attributes | |
| map_type | data_ |
| double | resolution_ = 1.0 |
Generic N dimensional sparse value regular grid.
| MapType | Associative container representing a mapping from a Eigen::Vector<int, NDim> to a value of type MapType::mapped_type. It should implement a subset of standard library's associative containers public API. In particular, given 'm' a possibly const instance of MapType:
|
| NDim | Dimension of the grid. |
Definition at line 46 of file sparse_value_grid.hpp.
| using beluga::SparseValueGrid< MapType, NDim >::key_type = typename map_type::key_type |
Key type for the key-value pairs.
Definition at line 55 of file sparse_value_grid.hpp.
| using beluga::SparseValueGrid< MapType, NDim >::map_type = MapType |
Underlying associative container.
Definition at line 51 of file sparse_value_grid.hpp.
| using beluga::SparseValueGrid< MapType, NDim >::mapped_type = typename map_type::mapped_type |
Value type of the key-value pairs stored in the data.
Definition at line 53 of file sparse_value_grid.hpp.
|
default |
Construct without data and with a 1 cell/meter resolution.
|
inlineexplicit |
Constructs the grid.
| data | Grid data. |
| resolution | Grid resolution. |
Definition at line 63 of file sparse_value_grid.hpp.
|
inline |
Gets grid data.
Definition at line 74 of file sparse_value_grid.hpp.
|
inline |
Gets grid data at cell_index or std::nullopt if it's not present.
Definition at line 77 of file sparse_value_grid.hpp.
|
inline |
Gets grid data at real coordinates 'coordinates' or std::nullopt if it's not present.
Definition at line 86 of file sparse_value_grid.hpp.
|
inline |
Gets grid resolution.
Definition at line 68 of file sparse_value_grid.hpp.
|
inline |
Gets grid size (ie. number of grid cells).
Definition at line 71 of file sparse_value_grid.hpp.
|
private |
Definition at line 91 of file sparse_value_grid.hpp.
|
private |
Definition at line 92 of file sparse_value_grid.hpp.