__GNU_PBDS::TRIE_PREFIX_SEARCH_NODE_UPDATE(3)
π __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_Alloctype.typedef node_const_iterator::value_type const_iteratortypedef node_iterator::value_type iteratortypedef base_type::key_const_reference key_const_referencetypedef base_type::key_type key_typetypedef null_type metadata_typetypedef Node_CItr node_const_iteratortypedef Node_Itr node_iteratortypedef 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 matchr_key.std::pair< const_iterator, const_iterator > prefix_range (key_const_reference) constβ finds the const iterator range corresponding to all values whose prefixes matchr_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