__GNU_PBDS::TRIE_PREFIX_SEARCH_NODE_UPDATE(3)

πŸ“¦
version 16.2.1+r23+gd564253eb6c8 Β· 5 versions
, in arch rolling, centos-stream 10, fedora 43, fedora 44

πŸ’– __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc > πŸ’–

okay bestie, sit down, hydrate, and let me tell you about this absolute icon from the libstdc++ Library Functions Manual. Yes the title is a whole paragraph, no I will not be shortening it, it's giving full government name energy and we respect that. 🫢


✨ NAME ✨

__gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc > β€” a node updator that lets tries be searched for the range of values that match a certain prefix. that's it, that's the whole job, and she does it flawlessly. πŸ’…


✨ SYNOPSIS ✨

first things first, you gotta bring her in:

#include <trie_policy.hpp>

and she Inherits __gnu_pbds::detail::trie_policy_base< Node_CItr, Node_Itr, _ATraits, _Alloc >. family tree? immaculate. πŸ‘‘


🌸 Public Types 🌸

the whole friend group, in order:

  • typedef access_traits::const_iterator a_const_iterator β€” const element iterator. she looks but does not touch. πŸ™ˆ
  • typedef _ATraits access_traits β€” element access traits.
  • typedef _Alloc allocator_type β€” the _Alloc type.
  • typedef node_const_iterator::value_type const_iterator
  • typedef node_iterator::value_type iterator
  • typedef base_type::key_const_reference key_const_reference
  • typedef base_type::key_type key_type
  • typedef null_type metadata_type
  • typedef Node_CItr node_const_iterator
  • typedef Node_Itr node_iterator
  • typedef allocator_type::size_type size_type β€” size type. she knows her own size, self-aware queen. πŸ’–

πŸ”₯ Public Member Functions πŸ”₯

the actual main characters, no skips:

  • std::pair< iterator, iterator > prefix_range (a_const_iterator, a_const_iterator) β€” finds the iterator range corresponding to all values whose prefixes match [b, e).
  • std::pair< const_iterator, const_iterator > prefix_range (a_const_iterator, a_const_iterator) const β€” finds the const iterator range corresponding to all values whose prefixes match [b, e).
  • std::pair< iterator, iterator > prefix_range (key_const_reference) β€” finds the iterator range corresponding to all values whose prefixes match r_key.
  • std::pair< const_iterator, const_iterator > prefix_range (key_const_reference) const β€” finds the const iterator range corresponding to all values whose prefixes match r_key.

four overloads, all named prefix_range, all serving. the const/non-const thing? iconic behaviour. ⭐


πŸŽ€ Protected Member Functions πŸŽ€

  • void operator() (node_iterator node_it, node_const_iterator end_nd_it) const β€” called to update a node's metadata. this is the backstage pass, protected, you can't just walk in. πŸšͺ

Detailed Description

template<typename Node_CItr, typename Node_Itr, typename _ATraits, typename _Alloc>
class __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >
"A node updator that allows tries to be searched for the range of values that match a certain prefix.

(yes the quote mark is in the original, i'm not about to editorialise on it, we keep everything fr fr) πŸ“Œ


πŸ’œ Member Typedef Documentation πŸ’œ

a_const_iterator

template<typename Node_CItr, typename Node_Itr, typename _ATraits, typename _Alloc>
typedef access_traits::const_iterator __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::a_const_iterator

const element iterator. no notes. πŸ’œ

access_traits

template<typename Node_CItr, typename Node_Itr, typename _ATraits, typename _Alloc>
typedef _ATraits __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::access_traits

element access traits.

allocator_type

template<typename Node_CItr, typename Node_Itr, typename _ATraits, typename _Alloc>
typedef _Alloc __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::allocator_type

the _Alloc type. she allocates. she commits. 🧚

size_type

template<typename Node_CItr, typename Node_Itr, typename _ATraits, typename _Alloc>
typedef allocator_type::size_type __gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::size_type

size type.


πŸ’… Member Function Documentation πŸ’…

operator() β€” the metadata glow-up πŸ¦‹

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

called to update a node's metadata. that's the whole assignment. she shows up, she updates, she leaves. periodt. ✨

prefix_range (b, e) β€” the mutable one

template<typename Node_CItr, typename Node_Itr, typename _ATraits, typename _Alloc>
std::pair<
    typename trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::iterator,
    typename trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::iterator
>
__gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::prefix_range
    (a_const_iterator b, a_const_iterator e)

finds the iterator range corresponding to all values whose prefixes match [b, e).

prefix_range (b, e) const β€” same but const πŸŽ€

template<typename Node_CItr, typename Node_Itr, typename _ATraits, typename _Alloc>
std::pair<
    typename trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::const_iterator,
    typename trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::const_iterator
>
__gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::prefix_range
    (a_const_iterator b, a_const_iterator e) const

finds the const iterator range corresponding to all values whose prefixes match [b, e).

prefix_range (r_key) β€” key edition 🌸

template<typename Node_CItr, typename Node_Itr, typename _ATraits, typename _Alloc>
std::pair<
    typename trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::iterator,
    typename trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::iterator
>
__gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::prefix_range
    (key_const_reference r_key)

finds the iterator range corresponding to all values whose prefixes match r_key.

prefix_range (r_key) const β€” key edition, but const πŸ’œ

template<typename Node_CItr, typename Node_Itr, typename _ATraits, typename _Alloc>
std::pair<
    typename trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::const_iterator,
    typename trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::const_iterator
>
__gnu_pbds::trie_prefix_search_node_update< Node_CItr, Node_Itr, _ATraits, _Alloc >::prefix_range
    (key_const_reference r_key) const

finds the const iterator range corresponding to all values whose prefixes match r_key.


🌈 Author 🌈

Author: Generated automatically by Doxygen for libstdc++ from the source code.

and that's the whole page, bestie!! πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

this was <libstdc++> β€” the <__gnu_pbds...s, _Alloc >(3) family, straight out of the Library Functions Manual, and the whole thing was auto-generated by Doxygen for libstdc++ from the source code, so go thank Doxygen and the libstdc++ girlies. no cap, they ate. πŸ‘‘πŸ”₯β­πŸ’€πŸ’œπŸ“πŸ§š

πŸ“¦ where this page comes from
  • arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
  • centos-stream 10: gcc-toolset-15-libstdc++-docs 15.2.1-8.1.el10 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • centos-stream 10: gcc-toolset-16-libstdc++-docs 16.2.1-1.3.el10 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • centos-stream 10: libstdc++-docs 14.4.1-4.el10 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • fedora 43: libstdc++-docs 15.2.1-2.fc43 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • fedora 43: libstdc++-docs 15.3.1-1.fc43 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • fedora 44: libstdc++-docs 16.0.1-0.10.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • fedora 44: libstdc++-docs 16.2.1-2.fc44
  • fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms