Template Class QueryAccelerator< HashedWaveletOctree >

Class Documentation

template<>
class QueryAccelerator<HashedWaveletOctree>

A class that accelerates queries by caching block and parent node addresses to speed up data structure traversals, and intermediate wavelet decompression results to reduce redundant computation.

Note

This class is safe to use in a multi-threaded environment. However, concurrent calls to a single instance from multiple threads are not. Since the accelerator is lightweight and cheap to construct, we recommend using a separate instance per thread for the best performance and simplicity.

Public Functions

inline explicit QueryAccelerator(const HashedWaveletOctree &map)
void reset()

Reset the cache.

Note

This method must be called whenever the map changes, not only to guarantee correct values (after node value changes) but also to avoid segmentation fault after map topology changes (e.g. after pruning).

inline FloatingPoint getCellValue(const Index3D &index)

Query the value of the map at a given index.

FloatingPoint getCellValue(const OctreeIndex &index)

Query the value of the map at a given octree node index.

inline FloatingPoint getMinCellWidth() const

Convenience function to get the map’s minimum cell width.

Public Static Attributes

static constexpr int kDim = HashedWaveletOctree::kDim