# `tree_order_statistics_node_update` Interface

Functor updating ranks of entrees.

Defined in: `tree_policy.hpp`

## Template Parameters

Parameter | Description | Default Value
    class Const_Node_Iterator
| Const node iterator type. | -
    class Node_Iterator
| Node iterator type. | -
    class Cmp_Fn
| Comparison functor. | -
    class Allocator
| Allocator type. | -

## Public Types and Constants

### Policy Definitions

Type | Definition | Description
    cmp_fn
    Cmp_Fn
| `Allocator` type.
    allocator
    Allocator
| `Allocator` type.

### General Definitions

Type | Definition | Description
    size_type
    typename allocator::size_type
| Size type.

### Key-type Definitions

Type | Definition | Description
    key_type
    The instantiating container's key type.
| Key type.
    const_key_reference
    The instantiating container's const key reference type.
| Const key reference.

### Metadata-Type Definitions

Type | Definition | Description
    metadata_type
    size_type
| Metadata type.

### Iterator Definitions

Type | Definition | Description
    const_node_iterator
    Const_Node_Iterator
| Const node iterator type.
    node_iterator
    Node_Iterator
| Node iterator type.
    const_iterator
    typename const_node_iterator::value_type
| Const iterator type.
    iterator
    typename node_iterator::value_type
| Iterator type.

## Public Methods

### Find-Type Methods

Method | Description
    inline const_iterator
      find_by_order
      (size_type order) 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.
    inline iterator
      find_by_order
      (size_type order)
| 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.
    inline size_type
      order_of_key
      (const_key_reference r_key) 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.

## Protected Types and Constants

### Value-type Definitions

Type | Definition | Description
    const_reference
    The instantiating container's const reference  type.
| Const reference to the container's value-type.
    const_pointer
    The instantiating container's const pointer  type.
| Const pointer to the container's value-type.
    const_metadata_reference
    typename Allocator::template rebind<
        metadata_type>::other::const_reference
| Const metadata reference.
    metadata_reference
    typename Allocator::template rebind<
        metadata_type>::other::reference
| Metadata reference.

## Protected Methods

### Operators

Method | Description
    inline void
      operator()
      (node_iterator node_it,
        const_node_iterator end_nd_it) const
| Updates the rank of a node through a `node_iterator` `node_it`; `end_nd_it` is the end node `iterator`.

### Constructors, destructor, and related

Method | Description
    virtual
      ~tree_order_statistics_node_update
      ()
| Destructor.

## Private Methods

### Overrides

Method | Description
    virtual const_node_iterator
      node_begin
      () const = 0
| Returns the `const_node_iterator` associated with the tree's root node.
    virtual node_iterator
      node_begin
      () = 0
| Returns the `node_iterator` associated with the tree's root node.
    virtual const_node_iterator
      node_end
      () const = 0
| Returns the `const_node_iterator` associated with a just-after leaf node.
    virtual node_iterator
      node_end
      () = 0
| Returns the `node_iterator` associated with a just-after leaf node.
    virtual cmp_fn &
      get_cmp_fn
      () = 0
| Access to the `cmp_fn` object.