Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::hld_detail::HLD_Tree_Data< GT, SA > Class Template Reference

#include <HLD.H>

Inheritance diagram for Aleph::hld_detail::HLD_Tree_Data< GT, SA >:
[legend]
Collaboration diagram for Aleph::hld_detail::HLD_Tree_Data< GT, SA >:
[legend]

Public Types

using Node = typename GT::Node
 
using Arc = typename GT::Arc
 

Public Member Functions

 HLD_Tree_Data (const GT &g, Node *root, SA sa=SA())
 
size_t size () const noexcept
 
bool is_empty () const noexcept
 
Noderoot () const noexcept
 
size_t root_id () const noexcept
 
const Array< Node * > & id_to_node () const noexcept
 
const Array< size_t > & parent () const noexcept
 
const Array< size_t > & depth () const noexcept
 
const Array< size_t > & subtree_size () const noexcept
 
const Array< size_t > & pos () const noexcept
 
const Array< size_t > & chain_head () const noexcept
 
const Array< size_t > & tin () const noexcept
 
const Array< size_t > & tout () const noexcept
 
size_t num_chains () const noexcept
 
size_t id_of (const Node *node) const
 
Nodenode_of (const size_t id) const
 
void validate_id (const size_t id, const char *where) const
 

Static Public Attributes

static constexpr size_t NONE = std::numeric_limits<size_t>::max()
 

Private Types

using Pair_Key = std::pair< size_t, size_t >
 

Private Member Functions

void index_nodes ()
 
void build_simple_adjacency ()
 
void compute_sizes_and_parents ()
 
void reorder_adjacency_heavy_first ()
 
void compute_hld_positions ()
 
void check_id (const size_t id, const char *where) const
 

Static Private Member Functions

static Pair_Key normalize_pair (size_t u, size_t v) noexcept
 

Private Attributes

const GTgraph_ = nullptr
 
SA sa_
 
Noderoot_ = nullptr
 
size_t root_id_ = NONE
 
size_t n_ = 0
 
Array< Node * > id_to_node_
 
MapOLhash< Node *, size_t > node_to_id_
 
Array< Array< size_t > > adjacency_
 
Array< size_t > parent_
 
Array< size_t > depth_
 
Array< size_t > subtree_size_
 
Array< size_t > pos_
 
Array< size_t > chain_head_
 
Array< size_t > tin_
 
Array< size_t > tout_
 
size_t num_chains_ = 0
 

Detailed Description

template<class GT, class SA>
class Aleph::hld_detail::HLD_Tree_Data< GT, SA >

Definition at line 119 of file HLD.H.

Member Typedef Documentation

◆ Arc

Definition at line 123 of file HLD.H.

◆ Node

Definition at line 122 of file HLD.H.

◆ Pair_Key

template<class GT , class SA >
using Aleph::hld_detail::HLD_Tree_Data< GT, SA >::Pair_Key = std::pair<size_t, size_t>
private

Definition at line 128 of file HLD.H.

Constructor & Destructor Documentation

◆ HLD_Tree_Data()

Member Function Documentation

◆ build_simple_adjacency()

◆ chain_head()

◆ check_id()

◆ compute_hld_positions()

◆ compute_sizes_and_parents()

◆ depth()

◆ id_of()

◆ id_to_node()

template<class GT , class SA >
const Array< Node * > & Aleph::hld_detail::HLD_Tree_Data< GT, SA >::id_to_node ( ) const
inlinenoexcept

◆ index_nodes()

◆ is_empty()

template<class GT , class SA >
bool Aleph::hld_detail::HLD_Tree_Data< GT, SA >::is_empty ( ) const
inlinenoexcept

◆ node_of()

◆ normalize_pair()

template<class GT , class SA >
static Pair_Key Aleph::hld_detail::HLD_Tree_Data< GT, SA >::normalize_pair ( size_t  u,
size_t  v 
)
inlinestaticprivatenoexcept

◆ num_chains()

template<class GT , class SA >
size_t Aleph::hld_detail::HLD_Tree_Data< GT, SA >::num_chains ( ) const
inlinenoexcept

◆ parent()

◆ pos()

◆ reorder_adjacency_heavy_first()

◆ root()

template<class GT , class SA >
Node * Aleph::hld_detail::HLD_Tree_Data< GT, SA >::root ( ) const
inlinenoexcept

◆ root_id()

template<class GT , class SA >
size_t Aleph::hld_detail::HLD_Tree_Data< GT, SA >::root_id ( ) const
inlinenoexcept

◆ size()

template<class GT , class SA >
size_t Aleph::hld_detail::HLD_Tree_Data< GT, SA >::size ( ) const
inlinenoexcept

◆ subtree_size()

◆ tin()

template<class GT , class SA >
const Array< size_t > & Aleph::hld_detail::HLD_Tree_Data< GT, SA >::tin ( ) const
inlinenoexcept

Definition at line 471 of file HLD.H.

References Aleph::hld_detail::HLD_Tree_Data< GT, SA >::tin_.

◆ tout()

template<class GT , class SA >
const Array< size_t > & Aleph::hld_detail::HLD_Tree_Data< GT, SA >::tout ( ) const
inlinenoexcept

Definition at line 472 of file HLD.H.

References Aleph::hld_detail::HLD_Tree_Data< GT, SA >::tout_.

◆ validate_id()

Member Data Documentation

◆ adjacency_

◆ chain_head_

◆ depth_

◆ graph_

◆ id_to_node_

◆ n_

◆ node_to_id_

◆ NONE

◆ num_chains_

◆ parent_

◆ pos_

◆ root_

◆ root_id_

◆ sa_

◆ subtree_size_

◆ tin_

◆ tout_


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