Class HashedChunkedWaveletOctree

Inheritance Relationships

Base Type

Class Documentation

class HashedChunkedWaveletOctree : public wavemap::MapBase

Public Types

using Ptr = std::shared_ptr<HashedChunkedWaveletOctree>
using ConstPtr = std::shared_ptr<const HashedChunkedWaveletOctree>
using Config = HashedChunkedWaveletOctreeConfig
using BlockIndex = Index3D
using CellIndex = OctreeIndex
using Block = HashedChunkedWaveletOctreeBlock
using BlockHashMap = SpatialHash<Block, kDim>

Public Functions

inline explicit HashedChunkedWaveletOctree(const HashedChunkedWaveletOctreeConfig &config)
HashedChunkedWaveletOctree(const HashedChunkedWaveletOctree&) = delete
inline virtual bool empty() const override

Whether the map is empty.

inline virtual size_t size() const override

The number of cells or nodes in the map.

virtual void threshold() override

Threshold the occupancy values of all cells in the map to stay within the range specified by its min_log_odds and max_log_odds.

virtual void prune() override

Free up memory by pruning nodes that are no longer needed.

Note

Implementations of this pruning operation should be lossless and does not alter the estimated occupancy posterior.

virtual void pruneSmart() override

Similar to prune(), but avoids de-allocating nodes that will likely be used again in the near future.

inline virtual void clear() override

Erase all cells in the map.

virtual size_t getMemoryUsage() const override

The amount of memory used by the map, in bytes.

virtual Index3D getMinIndex() const override

Index of the minimum corner of the map’s Axis Aligned Bounding Box.

virtual Index3D getMaxIndex() const override

Index of the maximum corner of the map’s Axis Aligned Bounding Box.

inline Index3D getMinBlockIndex() const
inline Index3D getMaxBlockIndex() const
inline virtual IndexElement getTreeHeight() const override

Height of the octree used to store the map.

Note

This value is only defined for multi-resolution maps.

inline IndexElement getChunkHeight() const
inline Index3D getBlockSize() const
inline const HashedChunkedWaveletOctreeConfig &getConfig()
inline virtual FloatingPoint getCellValue(const Index3D &index) const override

Query the value of the map at a given index.

inline FloatingPoint getCellValue(const OctreeIndex &index) const
inline virtual void setCellValue(const Index3D &index, FloatingPoint new_value) override

Set the value of the map at a given index.

inline virtual void addToCellValue(const Index3D &index, FloatingPoint update) override

Increment the value of the map at a given index.

inline bool hasBlock(const Index3D &block_index) const
inline bool eraseBlock(const BlockIndex &block_index)
template<typename IndexedBlockVisitor>
void eraseBlockIf(IndexedBlockVisitor indicator_fn)
inline Block *getBlock(const Index3D &block_index)
inline const Block *getBlock(const Index3D &block_index) const
inline Block &getOrAllocateBlock(const Index3D &block_index)
inline auto &getHashMap()
inline const auto &getHashMap() const
template<typename IndexedBlockVisitor>
void forEachBlock(IndexedBlockVisitor visitor_fn)
template<typename IndexedBlockVisitor>
void forEachBlock(IndexedBlockVisitor visitor_fn) const
virtual void forEachLeaf(typename MapBase::IndexedLeafVisitorFunction visitor_fn) const override
inline BlockIndex indexToBlockIndex(const OctreeIndex &node_index) const
inline CellIndex indexToCellIndex(OctreeIndex index) const

Public Static Attributes

static constexpr bool kRequiresExplicitThresholding = true