Template Class NdtreeBlockHash

Class Documentation

template<typename CellDataT, int dim>
class NdtreeBlockHash

Public Types

using Block = Ndtree<CellDataT, dim>
using Node = typename Block::NodeType
using BlockHashMap = SpatialHash<Block, dim>
using IndexType = NdtreeIndex<dim>
using HeightType = IndexElement

Public Functions

inline explicit NdtreeBlockHash(HeightType max_tree_height, CellDataT default_value = {})
inline bool empty() const
inline size_t size() const
inline void clear()
inline Index<dim> getMinBlockIndex() const
inline Index<dim> getMaxBlockIndex() const
inline HeightType getMaxHeight() const
bool hasBlock(const Index<dim> &block_index) const
bool eraseBlock(const Index<dim> &block_index)
template<typename IndexedBlockVisitor>
void eraseBlockIf(IndexedBlockVisitor indicator_fn)
inline Block *getBlock(const Index<dim> &block_index)
inline const Block *getBlock(const Index<dim> &block_index) const
inline Block &getOrAllocateBlock(const Index<dim> &block_index)
bool hasNode(const IndexType &index) const
bool eraseNode(const IndexType &index)
Node *getNode(const IndexType &index)
const Node *getNode(const IndexType &index) const
Node &getOrAllocateNode(const IndexType &index)
std::pair<Node*, HeightType> getNodeOrAncestor(const IndexType &index)
std::pair<const Node*, HeightType> getNodeOrAncestor(const IndexType &index) const
bool hasValue(const IndexType &index) const
CellDataT *getValue(const IndexType &index)
const CellDataT *getValue(const IndexType &index) const
CellDataT &getOrAllocateValue(const IndexType &index)
std::pair<CellDataT*, HeightType> getValueOrAncestor(const IndexType &index)
std::pair<const CellDataT*, HeightType> getValueOrAncestor(const IndexType &index) const
const CellDataT &getValueOrDefault(const IndexType &index) const
inline const CellDataT &getDefaultValue() const
bool equalsDefaultValue(const CellDataT &value) const
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
template<typename IndexedLeafVisitorFunction>
void forEachLeaf(IndexedLeafVisitorFunction visitor_fn)
template<typename IndexedLeafVisitorFunction>
void forEachLeaf(IndexedLeafVisitorFunction visitor_fn) const
inline Index<dim> indexToBlockIndex(const IndexType &index) const
inline IndexType indexToCellIndex(const IndexType &index) const
inline IndexType cellAndBlockIndexToIndex(const Index<dim> &block_index, const IndexType &cell_index) const

Public Static Attributes

static constexpr IndexElement kDim = dim
static constexpr HeightType kChunkHeight = 1

Protected Attributes

const HeightType max_height_
const CellDataT default_value_
BlockHashMap block_map_