ndtree
nd-octree data-structure and algorithms
ndtree::v1::node_length_fn Struct Reference

Description

Find the index of a node at a given location.

Public Member Functions

template<typename Loc , CONCEPT_REQUIRES_(Location< Loc >{}) >
auto operator() (Loc &&loc) const noexcept-> num_t
 Normalized length of the node at location loc. More...
 
template<typename Tree >
auto operator() (Tree const &t, node_idx n) const noexcept-> num_t
 Normalized length of the node n within the tree t. More...
 

Member Function Documentation

template<typename Loc , CONCEPT_REQUIRES_(Location< Loc >{}) >
auto ndtree::v1::node_length_fn::operator() ( Loc &&  loc) const -> num_t
noexcept

Normalized length of the node at location loc.

Parameters
loc[in] Node location

Time complexity: O(1)

template<typename Tree >
auto ndtree::v1::node_length_fn::operator() ( Tree const &  t,
node_idx  n 
) const -> num_t
noexcept

Normalized length of the node n within the tree t.

Parameters
t[in] Tree
n[in] Node index

Time complexity: O(log(N))