template class Bonxai::Grid

The Grid class is used to store data in a cube.

The size (DIM) of the cube can only be a power of 2

For instance, given Grid(3), DIM will be 8 and SIZE 512 (8³)

#include <mrpt/maps/bonxai/bonxai.hpp>

template <typename DataT>
class Grid
    // construction

    Grid(size_t log2dim);
    Grid(const Grid& other);
    Grid(Grid&& other);


    Grid& operator = (const Grid& other);
    Grid& operator = (Grid&& other);
    size_t memUsage() const;
    size_t size() const;
    Bonxai::Mask& mask();
    const Bonxai::Mask& mask() const;
    DataT& cell(size_t index);
    const DataT& cell(size_t index) const;