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

#include <LCA.H>

Inheritance diagram for Aleph::lca_detail::Rooted_Tree_Data< GT, SA >:
[legend]
Collaboration diagram for Aleph::lca_detail::Rooted_Tree_Data< GT, SA >:
[legend]

Public Types

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

Public Member Functions

 Rooted_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 > & tin () const noexcept
 
const Array< size_t > & tout () const noexcept
 
const Array< size_t > & first () const noexcept
 
const Array< size_t > & euler () const noexcept
 
size_t euler_size () 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
 
bool is_ancestor (const size_t u, const size_t v) 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 build_dfs_data ()
 
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 > tin_
 
Array< size_t > tout_
 
Array< size_t > first_
 
Array< size_t > euler_
 
size_t euler_size_ = 0
 

Detailed Description

template<class GT, class SA>
class Aleph::lca_detail::Rooted_Tree_Data< GT, SA >

Definition at line 126 of file LCA.H.

Member Typedef Documentation

◆ Arc

Definition at line 130 of file LCA.H.

◆ Node

Definition at line 129 of file LCA.H.

◆ Pair_Key

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

Definition at line 135 of file LCA.H.

Constructor & Destructor Documentation

◆ Rooted_Tree_Data()

Member Function Documentation

◆ build_dfs_data()

◆ build_simple_adjacency()

◆ check_id()

◆ depth()

◆ euler()

◆ euler_size()

◆ first()

template<class GT , class SA >
const Array< size_t > & Aleph::lca_detail::Rooted_Tree_Data< GT, SA >::first ( ) const
inlinenoexcept

◆ id_of()

◆ id_to_node()

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

Definition at line 357 of file LCA.H.

References Aleph::lca_detail::Rooted_Tree_Data< GT, SA >::id_to_node_.

◆ index_nodes()

◆ is_ancestor()

◆ is_empty()

◆ node_of()

◆ normalize_pair()

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

◆ parent()

◆ root()

◆ root_id()

◆ size()

◆ tin()

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

Definition at line 360 of file LCA.H.

References Aleph::lca_detail::Rooted_Tree_Data< GT, SA >::tin_.

◆ tout()

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

Definition at line 361 of file LCA.H.

References Aleph::lca_detail::Rooted_Tree_Data< GT, SA >::tout_.

◆ validate_id()

Member Data Documentation

◆ adjacency_

◆ depth_

◆ euler_

◆ euler_size_

◆ first_

◆ graph_

◆ id_to_node_

◆ n_

◆ node_to_id_

◆ NONE

template<class GT , class SA >
constexpr size_t Aleph::lca_detail::Rooted_Tree_Data< GT, SA >::NONE = std::numeric_limits<size_t>::max()
staticconstexpr

◆ parent_

◆ root_

◆ root_id_

◆ sa_

◆ tin_

◆ tout_


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