---
name: "__gnu_pbds::trie_order_statistics_node_update"
section: "3"
platform: "linux"
package: "gcc"
version: "16.2.1+r23+gd564253eb6c8-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/__gnu_pbds::trie_order_statistics_node_update"
---

# \_\_gnu\_pbds::trie\_order\_statistics\_node\_update(3)

Functor updating ranks of entrees.

## NAME

\_\_gnu\_pbds::trie\_order\_statistics\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \> - Functor updating ranks of entrees.

## SYNOPSIS

\#include \<trie\_policy.hpp\>

Inherits **\_\_gnu\_pbds::detail::trie\_policy\_base\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>**.

### Public Types

typedef access\_traits::const\_iterator **a\_const\_iterator**\
 typedef \_ATraits **access\_traits**\
 typedef \_Alloc **allocator\_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 size\_type **metadata\_type**\
 typedef Node\_CItr **node\_const\_iterator**\
 typedef Node\_Itr **node\_iterator**\
 typedef allocator\_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 exapmle, 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 exapmle, 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.

### 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\
 virtual const access\_traits & **get\_access\_traits** () const =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 \>"Functor updating ranks of entrees.

## Member Function Documentation

### template\<typename Node\_CItr, typename Node\_Itr, typename \_ATraits, typename \_Alloc\> trie\_order\_statistics\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>::iterator \_\_gnu\_pbds::trie\_order\_statistics\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>::find\_by\_order (size\_type order) \[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.

### template\<typename Node\_CItr, typename Node\_Itr, typename \_ATraits, typename \_Alloc\> trie\_order\_statistics\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>::const\_iterator \_\_gnu\_pbds::trie\_order\_statistics\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>::find\_by\_order (size\_type order) 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.

### 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 nd\_it, 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.

### template\<typename Node\_CItr, typename Node\_Itr, typename \_ATraits, typename \_Alloc\> trie\_order\_statistics\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>::size\_type \_\_gnu\_pbds::trie\_order\_statistics\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>::order\_of\_key (key\_const\_reference r\_key) const \[inline\]

Returns the order of a key within a sequence. For exapmle, 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.

### template\<typename Node\_CItr, typename Node\_Itr, typename \_ATraits, typename \_Alloc\> trie\_order\_statistics\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>::size\_type \_\_gnu\_pbds::trie\_order\_statistics\_node\_update\< Node\_CItr, Node\_Itr, \_ATraits, \_Alloc \>::order\_of\_prefix (a\_const\_iterator b, a\_const\_iterator e) const \[inline\]

Returns the order of a prefix within a sequence. For exapmle, 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.
