---
name: "__gnu_pbds::sample_resize_policy"
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::sample_resize_policy"
---

# \_\_gnu\_pbds::sample\_resize\_policy(3)

A sample resize policy.

## NAME

\_\_gnu\_pbds::sample\_resize\_policy - A sample resize policy.

## SYNOPSIS

\#include \<sample\_resize\_policy.hpp\>

### Public Types

typedef std::size\_t **size\_type**\
 Size type.

### Public Member Functions

**sample\_resize\_policy** ()\
 Default constructor.  **sample\_range\_hashing** (const **sample\_resize\_policy** &other)\
 Copy constructor.  void **swap** (**sample\_resize\_policy** &other)\
 Swaps content.

### Protected Member Functions

**size\_type** **get\_new\_size** (**size\_type** size, **size\_type** num\_used\_e) const\
 Queries what the new size should be.  bool **is\_resize\_needed** () const\
 Queries whether a resize is needed.  void **notify\_cleared** ()\
 Notifies the table was cleared.  void **notify\_erase\_search\_collision** ()\
 Notifies a search encountered a collision.  void **notify\_erase\_search\_end** ()\
 Notifies a search ended.  void **notify\_erase\_search\_start** ()\
 Notifies a search started.  void **notify\_erased** (**size\_type** num\_e)\
 Notifies an element was erased.  void **notify\_find\_search\_collision** ()\
 Notifies a search encountered a collision.  void **notify\_find\_search\_end** ()\
 Notifies a search ended.  void **notify\_find\_search\_start** ()\
 Notifies a search started.  void **notify\_insert\_search\_collision** ()\
 Notifies a search encountered a collision.  void **notify\_insert\_search\_end** ()\
 Notifies a search ended.  void **notify\_insert\_search\_start** ()\
 Notifies a search started.  void **notify\_inserted** (**size\_type** num\_e)\
 Notifies an element was inserted.  void **notify\_resized** (**size\_type** new\_size)\
 Notifies the table was resized to new\_size.

## Detailed Description

A sample resize policy.

## Member Typedef Documentation

### typedef std::size\_t \_\_gnu\_pbds::sample\_resize\_policy::size\_type

Size type.

## Constructor & Destructor Documentation

### \_\_gnu\_pbds::sample\_resize\_policy::sample\_resize\_policy ()

Default constructor.

Referenced by **sample\_range\_hashing()**, and **swap()**.

## Member Function Documentation

### size\_type \_\_gnu\_pbds::sample\_resize\_policy::get\_new\_size (size\_type size, size\_type num\_used\_e) const \[protected\]

Queries what the new size should be.

### bool \_\_gnu\_pbds::sample\_resize\_policy::is\_resize\_needed () const \[inline\], \[protected\]

Queries whether a resize is needed.

### void \_\_gnu\_pbds::sample\_resize\_policy::notify\_cleared () \[protected\]

Notifies the table was cleared.

### void \_\_gnu\_pbds::sample\_resize\_policy::notify\_erase\_search\_collision () \[inline\], \[protected\]

Notifies a search encountered a collision.

### void \_\_gnu\_pbds::sample\_resize\_policy::notify\_erase\_search\_end () \[inline\], \[protected\]

Notifies a search ended.

### void \_\_gnu\_pbds::sample\_resize\_policy::notify\_erase\_search\_start () \[inline\], \[protected\]

Notifies a search started.

### void \_\_gnu\_pbds::sample\_resize\_policy::notify\_erased (size\_type num\_e) \[inline\], \[protected\]

Notifies an element was erased.

### void \_\_gnu\_pbds::sample\_resize\_policy::notify\_find\_search\_collision () \[inline\], \[protected\]

Notifies a search encountered a collision.

### void \_\_gnu\_pbds::sample\_resize\_policy::notify\_find\_search\_end () \[inline\], \[protected\]

Notifies a search ended.

### void \_\_gnu\_pbds::sample\_resize\_policy::notify\_find\_search\_start () \[inline\], \[protected\]

Notifies a search started.

### void \_\_gnu\_pbds::sample\_resize\_policy::notify\_insert\_search\_collision () \[inline\], \[protected\]

Notifies a search encountered a collision.

### void \_\_gnu\_pbds::sample\_resize\_policy::notify\_insert\_search\_end () \[inline\], \[protected\]

Notifies a search ended.

### void \_\_gnu\_pbds::sample\_resize\_policy::notify\_insert\_search\_start () \[inline\], \[protected\]

Notifies a search started.

### void \_\_gnu\_pbds::sample\_resize\_policy::notify\_inserted (size\_type num\_e) \[inline\], \[protected\]

Notifies an element was inserted.

### void \_\_gnu\_pbds::sample\_resize\_policy::notify\_resized (size\_type new\_size) \[protected\]

Notifies the table was resized to new\_size.

### \_\_gnu\_pbds::sample\_resize\_policy::sample\_range\_hashing (const sample\_resize\_policy & other)

Copy constructor.

References **sample\_resize\_policy()**.

### void \_\_gnu\_pbds::sample\_resize\_policy::swap (sample\_resize\_policy & other) \[inline\]

Swaps content.

References **sample\_resize\_policy()**.

## Author

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