__GNU_PBDS::TRIE_ORDER_STATISTICS_NODE_UPDATE(3cxx)

hiii bestie πŸ’– you're on __gnu_pbds::trie_order_statistics_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc > β€” yes that's the whole name, she's long β€” from the (3cxx) manual. this one is a functor with rank-updating main character energy, and we're gonna get through every typedef together. no skipping, periodt. 🫢

🌸 NAME 🌸

__gnu_pbds::trie_order_statistics_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc > β€” Functor updating ranks of entrees. yes, the page says entrees, not entries, and honestly? iconic. πŸ“

✨ SYNOPSIS ✨

#include <trie_policy.hpp>

Inherits __gnu_pbds::detail::trie_policy_base< Node_CItr, Node_Itr, _ATraits, _Alloc >.

πŸŽ€ Public Types πŸŽ€

okay so here's the whole cast of typedefs, bestie:

  • typedef access_traits::const_iterator a_const_iterator β€” πŸ¦‹ const-iterator alias.
  • typedef _ATraits access_traits β€” the access traits type, slaying as access_traits.
  • typedef _Alloc allocator_type β€” allocator type, obviously.
  • typedef node_const_iterator::value_type const_iterator β€” const iterator type.
  • typedef node_iterator::value_type iterator β€” iterator type.
  • typedef base_type::key_const_reference key_const_reference β€” key const reference type.
  • typedef base_type::key_type key_type β€” key type.
  • typedef size_type metadata_type β€” metadata type.
  • typedef Node_CItr node_const_iterator β€” node const iterator type.
  • typedef Node_Itr node_iterator β€” node iterator type.
  • typedef allocator_type::size_type size_type β€” size type.

πŸ’… Public Member Functions πŸ’…

  • iterator find_by_order (size_type) β€” finds an entry by __order. returns an iterator to the entry with the __order order, or an iterator to the container object's end if order is at least the size of the container object. 🎯
  • const_iterator find_by_order (size_type) const β€” finds an entry by __order. returns a const_iterator to the entry with the __order order, or a const_iterator to the container object's end if order is at least the size of the container object. 🎯
  • size_type order_of_key (key_const_reference) const β€” returns the order of a key within a sequence. for example, if r_key is the smallest key, this method will return 0; if r_key is a key between the smallest and next key, this method will return 1; if r_key is a key larger than the largest key, this method will return the size of r_c. ✨
  • size_type order_of_prefix (a_const_iterator, a_const_iterator) const β€” returns the order of a prefix within a sequence. for example, if [b, e] is the smallest prefix, this method will return 0; if r_key is a key between the smallest and next key, this method will return 1; if r_key is a key larger than the largest key, this method will return the size of r_c. and yes it says r_key in the prefix one too β€” we're not fixing the lore 😭

πŸ›‘οΈ Protected Member Functions πŸ›‘οΈ

  • void operator() (node_iterator, node_const_iterator) const β€” updates the rank of a node through a node_iterator node_it; end_nd_it is the end node iterator. πŸ”₯

πŸ™ˆ Private Member Functions πŸ™ˆ

  • virtual const_iterator end () const =0 β€” the end thing, marked =0.
  • virtual const access_traits & get_access_traits () const =0 β€” access traits getter, marked =0.

πŸ’œ Detailed Description πŸ’œ

template<typename Node_CItr, typename Node_Itr, typename _ATraits, typename
    _Alloc>
class __gnu_pbds::trie_order_statistics_node_update< Node_CItr,
    Node_Itr, _ATraits, _Alloc >

and the description text is literally: "Functor updating ranks of entrees. β€” stray quote included, because we keep the lore. 😭

πŸ”₯ Member Function Documentation πŸ”₯

🎯 find_by_order (size_type) β€” non-const

template<typename Node_CItr , typename Node_Itr , typename _ATraits ,
    typename _Alloc > iterator
__gnu_pbds::trie_order_statistics_node_update< Node_CItr, Node_Itr,
    _ATraits, _Alloc >::find_by_order (size_type) [inline]

finds an entry by __order. returns an iterator to the entry with the __order order, or an iterator to the container object's end if order is at least the size of the container object. πŸ’«

🎯 find_by_order (size_type) const β€” const version

template<typename Node_CItr , typename Node_Itr , typename _ATraits ,
    typename _Alloc > const_iterator
__gnu_pbds::trie_order_statistics_node_update< Node_CItr, Node_Itr,
    _ATraits, _Alloc >::find_by_order (size_type) const [inline]

finds an entry by __order. returns a const_iterator to the entry with the __order order, or a const_iterator to the container object's end if order is at least the size of the container object. πŸ’«

πŸ› οΈ operator() (node_iterator, node_const_iterator) const β€” protected

template<typename Node_CItr , typename Node_Itr , typename _ATraits ,
    typename _Alloc > void __gnu_pbds::trie_order_statistics_node_update<
    Node_CItr, Node_Itr, _ATraits, _Alloc >::operator() (node_iterator,
    node_const_iterator) const [inline],  [protected]

updates the rank of a node through a node_iterator node_it; end_nd_it is the end node iterator. πŸ› οΈ

✨ order_of_key (key_const_reference) const

template<typename Node_CItr , typename Node_Itr , typename _ATraits ,
    typename _Alloc > size_type
__gnu_pbds::trie_order_statistics_node_update< Node_CItr, Node_Itr,
    _ATraits, _Alloc >::order_of_key (key_const_reference) const [inline]

returns the order of a key within a sequence. for example, if r_key is the smallest key, this method will return 0; if r_key is a key between the smallest and next key, this method will return 1; if r_key is a key larger than the largest key, this method will return the size of r_c. ✨

✨ order_of_prefix (a_const_iterator, a_const_iterator) const

template<typename Node_CItr , typename Node_Itr , typename _ATraits ,
    typename _Alloc > size_type
__gnu_pbds::trie_order_statistics_node_update< Node_CItr, Node_Itr,
    _ATraits, _Alloc >::order_of_prefix (a_const_iterator, a_const_iterator)
    const [inline]

returns the order of a prefix within a sequence. for example, if [b, e] is the smallest prefix, this method will return 0; if r_key is a key between the smallest and next key, this method will return 1; if r_key is a key larger than the largest key, this method will return the size of r_c. 🌈

πŸ¦‹ Author πŸ¦‹

Generated automatically by Doxygen for libstdc++ from the source code. πŸ’–


mwah πŸ’‹ this cutie is from the libst__gnu_pbds::tri...raits, _Alloc >(3cxx) footer, for libstdc++, auto-generated by Doxygen straight from the source code. no date on the page, so that's the whole tea 🫢