libstdc++: __gnu_pbds::sample_resize_policy Class Reference

libstdc++

__gnu_pbds::sample_resize_policy Class Reference

`#include <sample_resize_policy.hpp>`

## Public Types
typedef std::size_t | size_type

## Public Member Functions
| sample_resize_policy ()
| sample_range_hashing (const sample_resize_policy &other)
void | swap (sample_resize_policy &other)

## Protected Member Functions
size_type | get_new_size (size_type size, size_type num_used_e) const
bool | is_resize_needed () const
void | notify_cleared ()
void | notify_erase_search_collision ()
void | notify_erase_search_end ()
void | notify_erase_search_start ()
void | notify_erased (size_type num_e)
void | notify_find_search_collision ()
void | notify_find_search_end ()
void | notify_find_search_start ()
void | notify_insert_search_collision ()
void | notify_insert_search_end ()
void | notify_insert_search_start ()
void | notify_inserted (size_type num_e)
void | notify_resized (size_type new_size)

## Detailed Description

A sample resize policy.

Definition at line 47 of file sample_resize_policy.hpp.

## Member Typedef Documentation

## ◆ size_type

typedef std::size_t __gnu_pbds::sample_resize_policy::size_type

Size type.

Definition at line 51 of file sample_resize_policy.hpp.

## Constructor & Destructor Documentation

## ◆ sample_resize_policy()

__gnu_pbds::sample_resize_policy::sample_resize_policy | ( |  | ) |

Default constructor.

Referenced by sample_range_hashing(), and swap().

## Member Function Documentation

## ◆ get_new_size()

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.

## ◆ is_resize_needed()

bool __gnu_pbds::sample_resize_policy::is_resize_needed | ( |  | ) | const
| inlineprotected

Queries whether a resize is needed.

## ◆ notify_cleared()

void __gnu_pbds::sample_resize_policy::notify_cleared | ( |  | ) |
| protected

Notifies the table was cleared.

## ◆ notify_erase_search_collision()

void __gnu_pbds::sample_resize_policy::notify_erase_search_collision | ( |  | ) |
| inlineprotected

Notifies a search encountered a collision.

## ◆ notify_erase_search_end()

void __gnu_pbds::sample_resize_policy::notify_erase_search_end | ( |  | ) |
| inlineprotected

Notifies a search ended.

## ◆ notify_erase_search_start()

void __gnu_pbds::sample_resize_policy::notify_erase_search_start | ( |  | ) |
| inlineprotected

Notifies a search started.

## ◆ notify_erased()

void __gnu_pbds::sample_resize_policy::notify_erased | ( | size_type | num_e | ) |
| inlineprotected

Notifies an element was erased.

## ◆ notify_find_search_collision()

void __gnu_pbds::sample_resize_policy::notify_find_search_collision | ( |  | ) |
| inlineprotected

Notifies a search encountered a collision.

## ◆ notify_find_search_end()

void __gnu_pbds::sample_resize_policy::notify_find_search_end | ( |  | ) |
| inlineprotected

Notifies a search ended.

## ◆ notify_find_search_start()

void __gnu_pbds::sample_resize_policy::notify_find_search_start | ( |  | ) |
| inlineprotected

Notifies a search started.

## ◆ notify_insert_search_collision()

void __gnu_pbds::sample_resize_policy::notify_insert_search_collision | ( |  | ) |
| inlineprotected

Notifies a search encountered a collision.

## ◆ notify_insert_search_end()

void __gnu_pbds::sample_resize_policy::notify_insert_search_end | ( |  | ) |
| inlineprotected

Notifies a search ended.

## ◆ notify_insert_search_start()

void __gnu_pbds::sample_resize_policy::notify_insert_search_start | ( |  | ) |
| inlineprotected

Notifies a search started.

## ◆ notify_inserted()

void __gnu_pbds::sample_resize_policy::notify_inserted | ( | size_type | num_e | ) |
| inlineprotected

Notifies an element was inserted.

## ◆ notify_resized()

void __gnu_pbds::sample_resize_policy::notify_resized | ( | size_type | new_size | ) |
| protected

Notifies the table was resized to new_size.

## ◆ sample_range_hashing()

__gnu_pbds::sample_resize_policy::sample_range_hashing | ( | const sample_resize_policy & | other | ) |

Copy constructor.

References sample_resize_policy().

## ◆ swap()

void __gnu_pbds::sample_resize_policy::swap | ( | sample_resize_policy & | other | ) |
| inline

Swaps content.

References sample_resize_policy().

The documentation for this class was generated from the following file:

- sample_resize_policy.hpp