ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::hash_tree< input_collection_t, data_t, hash_function_t, hash_t, vector_t >::hashed_node Struct Reference

Default node in the hash tree. More...

#include <detray/test/utils/hash_tree.hpp>

Public Member Functions

 hashed_node (hash_t hash)
 Construct a node with its hash.
hash_t & key ()
 Get the mutable node hash.
const hash_t & key () const
 Get the node hash.
void set_children (dindex lc, dindex rc)
 Set the child node indices.
void set_parent (dindex pi)
 Set the parent node index.

Public Attributes

hash_t _key
 Hash key of this node.
dindex _left_child {detail::invalid_value<dindex>()}
 Index of this node's left child.
dindex _parent {detail::invalid_value<dindex>()}
 Index of this node's parent.
dindex _right_child {detail::invalid_value<dindex>()}
 Index of this node's right child.

Detailed Description

template<typename input_collection_t, typename data_t = typename input_collection_t::value_type, typename hash_function_t = default_hash<data_t>, typename hash_t = decltype(std::declval<hash_function_t>()(data_t{0})), template< typename > class vector_t = dvector>
struct detray::hash_tree< input_collection_t, data_t, hash_function_t, hash_t, vector_t >::hashed_node

Default node in the hash tree.

Constructor & Destructor Documentation

◆ hashed_node()

template<typename input_collection_t, typename data_t = typename input_collection_t::value_type, typename hash_function_t = default_hash<data_t>, typename hash_t = decltype(std::declval<hash_function_t>()(data_t{0})), template< typename > class vector_t = dvector>
detray::hash_tree< input_collection_t, data_t, hash_function_t, hash_t, vector_t >::hashed_node::hashed_node ( hash_t hash)
explicit

Construct a node with its hash.

Parameters
hashHash stored in the node.

Member Function Documentation

◆ key() [1/2]

template<typename input_collection_t, typename data_t = typename input_collection_t::value_type, typename hash_function_t = default_hash<data_t>, typename hash_t = decltype(std::declval<hash_function_t>()(data_t{0})), template< typename > class vector_t = dvector>
hash_t & detray::hash_tree< input_collection_t, data_t, hash_function_t, hash_t, vector_t >::hashed_node::key ( )

Get the mutable node hash.

Returns
Mutable reference to the node hash.

◆ key() [2/2]

template<typename input_collection_t, typename data_t = typename input_collection_t::value_type, typename hash_function_t = default_hash<data_t>, typename hash_t = decltype(std::declval<hash_function_t>()(data_t{0})), template< typename > class vector_t = dvector>
const hash_t & detray::hash_tree< input_collection_t, data_t, hash_function_t, hash_t, vector_t >::hashed_node::key ( ) const

Get the node hash.

Returns
Hash of the node.

◆ set_children()

template<typename input_collection_t, typename data_t = typename input_collection_t::value_type, typename hash_function_t = default_hash<data_t>, typename hash_t = decltype(std::declval<hash_function_t>()(data_t{0})), template< typename > class vector_t = dvector>
void detray::hash_tree< input_collection_t, data_t, hash_function_t, hash_t, vector_t >::hashed_node::set_children ( dindex lc,
dindex rc )

Set the child node indices.

Parameters
lcLeft child node index.
rcRight child node index.

◆ set_parent()

template<typename input_collection_t, typename data_t = typename input_collection_t::value_type, typename hash_function_t = default_hash<data_t>, typename hash_t = decltype(std::declval<hash_function_t>()(data_t{0})), template< typename > class vector_t = dvector>
void detray::hash_tree< input_collection_t, data_t, hash_function_t, hash_t, vector_t >::hashed_node::set_parent ( dindex pi)

Set the parent node index.

Parameters
piParent node index.