Template Struct NdtreeIndex

Struct Documentation

template<int dim>
struct NdtreeIndex

Public Types

using Element = NdtreeIndexElement
using RelativeChild = NdtreeIndexRelativeChild
using Position = Eigen::Matrix<Element, dim, 1>
using ChildArray = std::array<NdtreeIndex, kNumChildren>

Public Functions

inline bool operator==(const NdtreeIndex &other) const
inline bool operator!=(const NdtreeIndex &other) const
NdtreeIndex computeParentIndex() const
NdtreeIndex computeParentIndex(Element parent_height) const
NdtreeIndex computeChildIndex(RelativeChild relative_child_index) const
ChildArray computeChildIndices() const
RelativeChild computeRelativeChildIndex() const
std::string toString() const

Public Members

Element height = 0
Position position = Position::Zero()

Public Static Functions

static RelativeChild computeRelativeChildIndex(MortonIndex morton, Element parent_height)
static IndexElement computeLastCommonAncestorHeight(MortonIndex first_morton, Element first_height, MortonIndex second_morton, Element second_height)
static LinearIndex computeLevelTraversalDistance(MortonIndex morton, Element parent_height, Element child_height)
static LinearIndex computeTreeTraversalDistance(MortonIndex morton, Element parent_height, Element child_height)

Public Static Attributes

static constexpr Element kDim = dim
static constexpr RelativeChild kNumChildren = int_math::exp2(dim)