Resize policy for binary heap. More...
#include <resize_policy.hpp>
Public Types | |
typedef _Tp | size_type |
Public Member Functions | |
resize_policy () | |
resize_policy (const resize_policy &other) | |
size_type | get_new_size_for_arbitrary (size_type) const |
size_type | get_new_size_for_grow () const |
size_type | get_new_size_for_shrink () const |
bool | grow_needed (size_type) const |
void | notify_arbitrary (size_type) |
void | notify_grow_resize () |
void | notify_shrink_resize () |
bool | resize_needed_for_grow (size_type) const |
bool | resize_needed_for_shrink (size_type) const |
bool | shrink_needed (size_type) const |
void | swap (resize_policy< _Tp > &) |
Static Public Attributes | |
static const _Tp | min_size = 16 |
Private Types | |
enum | { ratio = 8, factor = 2 } |
Private Attributes | |
_Tp | m_grow_size |
Next grow size. More... | |
_Tp | m_shrink_size |
Next shrink size. More... | |
Resize policy for binary heap.
typedef _Tp __gnu_pbds::detail::resize_policy< _Tp >::size_type |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References PB_DS_ASSERT_VALID.
|
inline |
References _GLIBCXX_DEBUG_ASSERT, and PB_DS_ASSERT_VALID.
|
inline |
|
inline |
References _GLIBCXX_DEBUG_ASSERT.
|
inline |
References _GLIBCXX_DEBUG_ASSERT.
|
inline |
|
inline |
References __gnu_pbds::detail::resize_policy< _Tp >::m_grow_size, __gnu_pbds::detail::resize_policy< _Tp >::m_shrink_size, and std::__exception_ptr::swap().
|
private |
Next grow size.
Referenced by __gnu_pbds::detail::resize_policy< _Tp >::swap().
|
private |
Next shrink size.
Referenced by __gnu_pbds::detail::resize_policy< _Tp >::swap().
|
static |