Antkeeper  0.0.1
Public Types | Public Member Functions | Static Public Attributes | List of all members
geom::hyperoctree< T, N, Order > Class Template Reference

Hashed linear hyperoctree. More...

#include <hyperoctree.hpp>

Public Types

typedef T node_type
 Node identifier type. More...
 
typedef hyperoctree_container< order, node_type, depth_bits >::type container_type
 Node container type. More...
 
typedef container_type::iterator iterator
 Iterator type. More...
 
typedef container_type::const_iterator const_iterator
 Constant iterator type. More...
 
typedef std::conditional< order !=hyperoctree_order::unordered, std::reverse_iterator< iterator >, iterator >::type reverse_iterator
 Reverse iterator type. More...
 
typedef std::conditional< order !=hyperoctree_order::unordered, std::reverse_iterator< const_iterator >, const_iterator >::type const_reverse_iterator
 Constant reverse iterator type. More...
 

Public Member Functions

 hyperoctree ()
 Constructs a hyperoctree with a single root node. More...
 
Iterators
iterator begin () noexcept
 Returns an iterator to the first node, in the traversal order specified by hyperoctree::order. More...
 
const_iterator begin () const noexcept
 Returns an iterator to the first node, in the traversal order specified by hyperoctree::order. More...
 
const_iterator cbegin () const noexcept
 Returns an iterator to the first node, in the traversal order specified by hyperoctree::order. More...
 
iterator end () noexcept
 Returns an iterator to the node following the last node, in the traversal order specified by hyperoctree::order. More...
 
const_iterator end () const noexcept
 Returns an iterator to the node following the last node, in the traversal order specified by hyperoctree::order. More...
 
const_iterator cend () const noexcept
 Returns an iterator to the node following the last node, in the traversal order specified by hyperoctree::order. More...
 
reverse_iterator rbegin () noexcept
 Returns a reverse iterator to the first node of the revered hyperoctree, in the traversal order specified by hyperoctree::order. More...
 
const_reverse_iterator rbegin () const noexcept
 Returns a reverse iterator to the first node of the revered hyperoctree, in the traversal order specified by hyperoctree::order. More...
 
const_reverse_iterator crbegin () const noexcept
 Returns a reverse iterator to the first node of the revered hyperoctree, in the traversal order specified by hyperoctree::order. More...
 
reverse_iterator rend () noexcept
 Returns a reverse iterator to the node following the last node of the reverse hyperoctree, in the traversal order specified by hyperoctree::order. More...
 
const_reverse_iterator rend () const noexcept
 Returns a reverse iterator to the node following the last node of the reverse hyperoctree, in the traversal order specified by hyperoctree::order. More...
 
const_reverse_iterator crend () const noexcept
 Returns a reverse iterator to the node following the last node of the reverse hyperoctree, in the traversal order specified by hyperoctree::order. More...
 
Capacity
bool empty () const noexcept
 Checks if the hyperoctree has no nodes. More...
 
bool full () const noexcept
 Checks if the hyperoctree is full. More...
 
std::size_t size () const noexcept
 Returns the number of nodes in the hyperoctree. More...
 
constexpr std::size_t max_size () const noexcept
 Returns the total number of nodes the hyperoctree is capable of containing. More...
 
Modifiers
void clear ()
 Erases all nodes except the root node, which is persistent. More...
 
void insert (node_type node)
 Inserts a node and its siblings into the hyperoctree, inserting ancestors as necessary. More...
 
void erase (node_type node)
 Erases a node, along with its descendants, siblings, and descendants of siblings. More...
 
Lookup
bool contains (node_type node) const
 Checks if a node is contained within the hyperoctree. More...
 
bool is_leaf (node_type node) const
 Checks if a node has no children. More...
 

Static Public Member Functions

Nodes
static constexpr node_type depth (node_type node) noexcept
 Extracts the depth of a node from its identifier. More...
 
static constexpr node_type location (node_type node) noexcept
 Extracts the Morton location code of a node from its identifier. More...
 
static constexpr std::array< node_type, 2 > split (node_type node) noexcept
 Extracts the depth and Morton location code of a node from its identifier. More...
 
static constexpr node_type node (node_type depth, node_type location) noexcept
 Constructs an identifier for a node at the given depth and location. More...
 
static constexpr node_type ancestor (node_type node, node_type depth) noexcept
 Constructs an identifier for the ancestor of a node at a given depth. More...
 
static constexpr node_type parent (node_type node) noexcept
 Constructs an identifier for the parent of a node. More...
 
static constexpr node_type sibling (node_type node, node_type n) noexcept
 Constructs an identifier for the nth sibling of a node. More...
 
static constexpr node_type child (node_type node, T n) noexcept
 Constructs an identifier for the nth child of a node. More...
 
static constexpr node_type common_ancestor (node_type a, node_type b) noexcept
 Constructs an identifier for the first common ancestor of two nodes. More...
 

Static Public Attributes

static constexpr std::size_t dimensions = N
 Number of dimensions. More...
 
static constexpr hyperoctree_order order = Order
 Node storage and traversal order. More...
 
static constexpr node_type max_depth = find_max_depth()
 Maximum node depth level. More...
 
static constexpr node_type node_bits = sizeof(node_type) * 8
 Number of bits in the node type. More...
 
static constexpr node_type depth_bits = std::bit_width(max_depth)
 Number of bits required to encode the depth of a node. More...
 
static constexpr node_type location_bits = (max_depth + 1) * N
 Number of bits required to encode the Morton location code of a node. More...
 
static constexpr node_type divider_bits = node_bits - (depth_bits + location_bits)
 Number of bits separating the depth and Morton location code in a node identifier. More...
 
static constexpr node_type children_per_node = math::compile::exp2<node_type>(N)
 Number of children per node. More...
 
static constexpr node_type siblings_per_node = children_per_node - 1
 Number of siblings per node. More...
 
static constexpr node_type resolution = math::compile::exp2<node_type>(max_depth)
 Resolution in each dimension. More...
 
static constexpr std::size_t max_node_count = (math::compile::pow<std::size_t>(resolution * 2, N) - 1) / siblings_per_node
 Number of nodes in a full hyperoctree. More...
 
static constexpr node_type root = 0
 Node identifier of the persistent root node. More...
 

Detailed Description

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
class geom::hyperoctree< T, N, Order >

Hashed linear hyperoctree.

Template Parameters
TUnsigned integral node identifier type.
NNumber of dimensions.
OrderOrder in which nodes are stored and traversed.
See also
http://codervil.blogspot.com/2015/10/octree-node-identifiers.html
https://geidav.wordpress.com/2014/08/18/advanced-octrees-2-node-representations/

Definition at line 98 of file hyperoctree.hpp.

Member Typedef Documentation

◆ const_iterator

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
typedef container_type::const_iterator geom::hyperoctree< T, N, Order >::const_iterator

Constant iterator type.

Definition at line 190 of file hyperoctree.hpp.

◆ const_reverse_iterator

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
typedef std::conditional<order != hyperoctree_order::unordered, std::reverse_iterator<const_iterator>, const_iterator>::type geom::hyperoctree< T, N, Order >::const_reverse_iterator

Constant reverse iterator type.

Definition at line 196 of file hyperoctree.hpp.

◆ container_type

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
typedef hyperoctree_container<order, node_type, depth_bits>::type geom::hyperoctree< T, N, Order >::container_type

Node container type.

Definition at line 184 of file hyperoctree.hpp.

◆ iterator

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
typedef container_type::iterator geom::hyperoctree< T, N, Order >::iterator

Iterator type.

Definition at line 187 of file hyperoctree.hpp.

◆ node_type

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
typedef T geom::hyperoctree< T, N, Order >::node_type

Node identifier type.

Definition at line 145 of file hyperoctree.hpp.

◆ reverse_iterator

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
typedef std::conditional<order != hyperoctree_order::unordered, std::reverse_iterator<iterator>, iterator>::type geom::hyperoctree< T, N, Order >::reverse_iterator

Reverse iterator type.

Definition at line 193 of file hyperoctree.hpp.

Constructor & Destructor Documentation

◆ hyperoctree()

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
geom::hyperoctree< T, N, Order >::hyperoctree ( )
inline

Constructs a hyperoctree with a single root node.

Definition at line 329 of file hyperoctree.hpp.

Member Function Documentation

◆ ancestor()

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
static constexpr node_type geom::hyperoctree< T, N, Order >::ancestor ( node_type  node,
node_type  depth 
)
inlinestaticconstexprnoexcept

Constructs an identifier for the ancestor of a node at a given depth.

Parameters
nodeNode identifier.
depthAbsolute depth of an ancestor node.
Returns
Identifier of the ancestor of the node at the given depth.
Warning
If depth exceeds the depth of node, the returned node identifier is not valid.

Definition at line 264 of file hyperoctree.hpp.

◆ begin() [1/2]

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
const_iterator geom::hyperoctree< T, N, Order >::begin ( ) const
inlinenoexcept

Returns an iterator to the first node, in the traversal order specified by hyperoctree::order.

Note
Node identifiers cannot be modified through iterators.

Definition at line 345 of file hyperoctree.hpp.

◆ begin() [2/2]

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
iterator geom::hyperoctree< T, N, Order >::begin ( )
inlinenoexcept

Returns an iterator to the first node, in the traversal order specified by hyperoctree::order.

Note
Node identifiers cannot be modified through iterators.

Definition at line 341 of file hyperoctree.hpp.

◆ cbegin()

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
const_iterator geom::hyperoctree< T, N, Order >::cbegin ( ) const
inlinenoexcept

Returns an iterator to the first node, in the traversal order specified by hyperoctree::order.

Note
Node identifiers cannot be modified through iterators.

Definition at line 349 of file hyperoctree.hpp.

◆ cend()

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
const_iterator geom::hyperoctree< T, N, Order >::cend ( ) const
inlinenoexcept

Returns an iterator to the node following the last node, in the traversal order specified by hyperoctree::order.

Note
Node identifiers cannot be modified through iterators.

Definition at line 369 of file hyperoctree.hpp.

◆ child()

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
static constexpr node_type geom::hyperoctree< T, N, Order >::child ( node_type  node,
n 
)
inlinestaticconstexprnoexcept

Constructs an identifier for the nth child of a node.

Parameters
nodeNode identifier.
nOffset to a sibling of the first child node, automatically wrapped to [0, siblings_per_node].
Returns
Identifier of the nth child node.

Definition at line 306 of file hyperoctree.hpp.

◆ clear()

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
void geom::hyperoctree< T, N, Order >::clear ( )
inline

Erases all nodes except the root node, which is persistent.

Definition at line 484 of file hyperoctree.hpp.

◆ common_ancestor()

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
static constexpr node_type geom::hyperoctree< T, N, Order >::common_ancestor ( node_type  a,
node_type  b 
)
inlinestaticconstexprnoexcept

Constructs an identifier for the first common ancestor of two nodes.

Parameters
aIdentifier of the first node.
bIdentifier of the second node.
Returns
Identifier of the first common ancestor of the two nodes.

Definition at line 319 of file hyperoctree.hpp.

◆ contains()

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
bool geom::hyperoctree< T, N, Order >::contains ( node_type  node) const
inline

Checks if a node is contained within the hyperoctree.

Parameters
nodeIdentifier of the node to check for.
Returns
true if the hyperoctree contains the node, false otherwise.

Definition at line 549 of file hyperoctree.hpp.

◆ crbegin()

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
const_reverse_iterator geom::hyperoctree< T, N, Order >::crbegin ( ) const
inlinenoexcept

Returns a reverse iterator to the first node of the revered hyperoctree, in the traversal order specified by hyperoctree::order.

Note
Node identifiers cannot be modified through iterators.
If the hyperoctree is unordered, reverse iteration and forward iteration will be identical.

Definition at line 396 of file hyperoctree.hpp.

◆ crend()

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
const_reverse_iterator geom::hyperoctree< T, N, Order >::crend ( ) const
inlinenoexcept

Returns a reverse iterator to the node following the last node of the reverse hyperoctree, in the traversal order specified by hyperoctree::order.

Note
Node identifiers cannot be modified through iterators.
If the hyperoctree is unordered, reverse iteration and forward iteration will be identical.

Definition at line 426 of file hyperoctree.hpp.

◆ depth()

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
static constexpr node_type geom::hyperoctree< T, N, Order >::depth ( node_type  node)
inlinestaticconstexprnoexcept

Extracts the depth of a node from its identifier.

Parameters
nodeNode identifier.
Returns
Depth of the node.

Definition at line 207 of file hyperoctree.hpp.

◆ empty()

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
bool geom::hyperoctree< T, N, Order >::empty ( ) const
inlinenoexcept

Checks if the hyperoctree has no nodes.

Returns
true if the hyperoctree is empty, false otherwise.
Note
This function should always return false, as the root node is persistent.

Definition at line 445 of file hyperoctree.hpp.

◆ end() [1/2]

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
const_iterator geom::hyperoctree< T, N, Order >::end ( ) const
inlinenoexcept

Returns an iterator to the node following the last node, in the traversal order specified by hyperoctree::order.

Note
Node identifiers cannot be modified through iterators.

Definition at line 365 of file hyperoctree.hpp.

◆ end() [2/2]

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
iterator geom::hyperoctree< T, N, Order >::end ( )
inlinenoexcept

Returns an iterator to the node following the last node, in the traversal order specified by hyperoctree::order.

Note
Node identifiers cannot be modified through iterators.

Definition at line 361 of file hyperoctree.hpp.

◆ erase()

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
void geom::hyperoctree< T, N, Order >::erase ( node_type  node)
inline

Erases a node, along with its descendants, siblings, and descendants of siblings.

Parameters
nodeIdentifier of the node to erase.
Note
The root node is persistent and cannot be erased.

Definition at line 519 of file hyperoctree.hpp.

◆ full()

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
bool geom::hyperoctree< T, N, Order >::full ( ) const
inlinenoexcept

Checks if the hyperoctree is full.

Returns
true if the hyperoctree is full, false otherwise.

Definition at line 455 of file hyperoctree.hpp.

◆ insert()

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
void geom::hyperoctree< T, N, Order >::insert ( node_type  node)
inline

Inserts a node and its siblings into the hyperoctree, inserting ancestors as necessary.

Parameters
nodeNode to insert.
Note
The root node is persistent and does not need to be inserted.

Definition at line 496 of file hyperoctree.hpp.

◆ is_leaf()

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
bool geom::hyperoctree< T, N, Order >::is_leaf ( node_type  node) const
inline

Checks if a node has no children.

Parameters
nodeNode identififer.
Returns
true if the node has no children, and false otherwise.

Definition at line 561 of file hyperoctree.hpp.

◆ location()

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
static constexpr node_type geom::hyperoctree< T, N, Order >::location ( node_type  node)
inlinestaticconstexprnoexcept

Extracts the Morton location code of a node from its identifier.

Parameters
nodeNode identifier.
Returns
Morton location code of the node.

Definition at line 220 of file hyperoctree.hpp.

◆ max_size()

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
constexpr std::size_t geom::hyperoctree< T, N, Order >::max_size ( ) const
inlineconstexprnoexcept

Returns the total number of nodes the hyperoctree is capable of containing.

Definition at line 473 of file hyperoctree.hpp.

◆ node()

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
static constexpr node_type geom::hyperoctree< T, N, Order >::node ( node_type  depth,
node_type  location 
)
inlinestaticconstexprnoexcept

Constructs an identifier for a node at the given depth and location.

Parameters
depthDepth level.
locationMorton location code.
Returns
Identifier of a node at the given depth and location.
Warning
If depth exceeds max_depth, the returned node identifier is not valid.

Definition at line 249 of file hyperoctree.hpp.

◆ parent()

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
static constexpr node_type geom::hyperoctree< T, N, Order >::parent ( node_type  node)
inlinestaticconstexprnoexcept

Constructs an identifier for the parent of a node.

Parameters
nodeNode identifier.
Returns
Identifier of the parent node.

Definition at line 277 of file hyperoctree.hpp.

◆ rbegin() [1/2]

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
const_reverse_iterator geom::hyperoctree< T, N, Order >::rbegin ( ) const
inlinenoexcept

Returns a reverse iterator to the first node of the revered hyperoctree, in the traversal order specified by hyperoctree::order.

Note
Node identifiers cannot be modified through iterators.
If the hyperoctree is unordered, reverse iteration and forward iteration will be identical.

Definition at line 389 of file hyperoctree.hpp.

◆ rbegin() [2/2]

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
reverse_iterator geom::hyperoctree< T, N, Order >::rbegin ( )
inlinenoexcept

Returns a reverse iterator to the first node of the revered hyperoctree, in the traversal order specified by hyperoctree::order.

Note
Node identifiers cannot be modified through iterators.
If the hyperoctree is unordered, reverse iteration and forward iteration will be identical.

Definition at line 382 of file hyperoctree.hpp.

◆ rend() [1/2]

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
const_reverse_iterator geom::hyperoctree< T, N, Order >::rend ( ) const
inlinenoexcept

Returns a reverse iterator to the node following the last node of the reverse hyperoctree, in the traversal order specified by hyperoctree::order.

Note
Node identifiers cannot be modified through iterators.
If the hyperoctree is unordered, reverse iteration and forward iteration will be identical.

Definition at line 419 of file hyperoctree.hpp.

◆ rend() [2/2]

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
reverse_iterator geom::hyperoctree< T, N, Order >::rend ( )
inlinenoexcept

Returns a reverse iterator to the node following the last node of the reverse hyperoctree, in the traversal order specified by hyperoctree::order.

Note
Node identifiers cannot be modified through iterators.
If the hyperoctree is unordered, reverse iteration and forward iteration will be identical.

Definition at line 412 of file hyperoctree.hpp.

◆ sibling()

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
static constexpr node_type geom::hyperoctree< T, N, Order >::sibling ( node_type  node,
node_type  n 
)
inlinestaticconstexprnoexcept

Constructs an identifier for the nth sibling of a node.

Parameters
nodeNode identifier.
nOffset to a sibling, automatically wrapped to [0, siblings_per_node].
Returns
Identifier of the nth sibling node.

Definition at line 290 of file hyperoctree.hpp.

◆ size()

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
std::size_t geom::hyperoctree< T, N, Order >::size ( ) const
inlinenoexcept

Returns the number of nodes in the hyperoctree.

Returns
Number of nodes in the hyperoctree.
Note
Hyperoctree size will always be greater than or equal to one, as the root node is persistent.

Definition at line 467 of file hyperoctree.hpp.

◆ split()

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
static constexpr std::array<node_type, 2> geom::hyperoctree< T, N, Order >::split ( node_type  node)
inlinestaticconstexprnoexcept

Extracts the depth and Morton location code of a node from its identifier.

Parameters
nodeNode identifier.
Returns
Array containing the depth of the node, followed by the Morton location code of the node.

Definition at line 232 of file hyperoctree.hpp.

Member Data Documentation

◆ children_per_node

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
constexpr node_type geom::hyperoctree< T, N, Order >::children_per_node = math::compile::exp2<node_type>(N)
staticconstexpr

Number of children per node.

Definition at line 169 of file hyperoctree.hpp.

◆ depth_bits

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
constexpr node_type geom::hyperoctree< T, N, Order >::depth_bits = std::bit_width(max_depth)
staticconstexpr

Number of bits required to encode the depth of a node.

Definition at line 160 of file hyperoctree.hpp.

◆ dimensions

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
constexpr std::size_t geom::hyperoctree< T, N, Order >::dimensions = N
staticconstexpr

Number of dimensions.

Definition at line 148 of file hyperoctree.hpp.

◆ divider_bits

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
constexpr node_type geom::hyperoctree< T, N, Order >::divider_bits = node_bits - (depth_bits + location_bits)
staticconstexpr

Number of bits separating the depth and Morton location code in a node identifier.

Definition at line 166 of file hyperoctree.hpp.

◆ location_bits

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
constexpr node_type geom::hyperoctree< T, N, Order >::location_bits = (max_depth + 1) * N
staticconstexpr

Number of bits required to encode the Morton location code of a node.

Definition at line 163 of file hyperoctree.hpp.

◆ max_depth

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
constexpr node_type geom::hyperoctree< T, N, Order >::max_depth = find_max_depth()
staticconstexpr

Maximum node depth level.

Definition at line 154 of file hyperoctree.hpp.

◆ max_node_count

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
constexpr std::size_t geom::hyperoctree< T, N, Order >::max_node_count = (math::compile::pow<std::size_t>(resolution * 2, N) - 1) / siblings_per_node
staticconstexpr

Number of nodes in a full hyperoctree.

Definition at line 178 of file hyperoctree.hpp.

◆ node_bits

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
constexpr node_type geom::hyperoctree< T, N, Order >::node_bits = sizeof(node_type) * 8
staticconstexpr

Number of bits in the node type.

Definition at line 157 of file hyperoctree.hpp.

◆ order

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
constexpr hyperoctree_order geom::hyperoctree< T, N, Order >::order = Order
staticconstexpr

Node storage and traversal order.

Definition at line 151 of file hyperoctree.hpp.

◆ resolution

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
constexpr node_type geom::hyperoctree< T, N, Order >::resolution = math::compile::exp2<node_type>(max_depth)
staticconstexpr

Resolution in each dimension.

Definition at line 175 of file hyperoctree.hpp.

◆ root

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
constexpr node_type geom::hyperoctree< T, N, Order >::root = 0
staticconstexpr

Node identifier of the persistent root node.

Definition at line 181 of file hyperoctree.hpp.

◆ siblings_per_node

template<std::unsigned_integral T, std::size_t N, hyperoctree_order Order = hyperoctree_order::dfs_pre>
constexpr node_type geom::hyperoctree< T, N, Order >::siblings_per_node = children_per_node - 1
staticconstexpr

Number of siblings per node.

Definition at line 172 of file hyperoctree.hpp.


The documentation for this class was generated from the following file: