ELC in dev
ELC-lang
载入中...
搜索中...
未找到
elc::defs::container::hash_table_n::hash_table_t< T, stack_t, bucket_max_size > 模板类 参考

Public 类型

typedef array_t< bucket_t > base_t_w
 

Public 成员函数

void swap (base_t_w &a) noexcept
 
 hash_table_t () noexcept
 
 hash_table_t (special_init_t, size_t bucket_size) noexcept
 
 ~hash_table_t () noexcept(destruct.nothrow< base_t_w >)=default
 
 operator base_t_w & () noexcept
 
 operator const base_t_w & () const noexcept
 
 hash_table_t (const this_t &a) noexcept
 
 hash_table_t (this_t &&a) noexcept
 
this_toperator= (base_t_w &&a) &noexcept
 
this_toperator= (const base_t_w &a) &noexcept
 
void add (const T &a) noexcept(hash_nothrow< const T & > &&bucket_t::add_nothrow)
 
bool remove (const T &a) noexcept(bucket_t::remove_nothrow)
 
template<typename U >
maybe_fail_reference< T > find (U &&a) noexcept(find_nothrow< U >)
 
bool in_table (const T &a) noexcept(noexcept(((::std::declval< this_t >()).find(a).not_fail())))
 
bool not_in_table (const T &a) noexcept(noexcept(((::std::declval< this_t >()).in_table(a))))
 
size_t size () noexcept
 
void clear () noexcept(re_construct.nothrow< this_t >)
 
template<typename func_t >
requires (bool(requires{ (::std::declval< func_t >())((::std::declval< T& >())) ;}))
void for_each (func_t &&func) noexcept(noexcept(((::std::declval< func_t >())((::std::declval< T & >())))))
 
template<typename func_t >
requires (bool(requires{ (::std::declval< func_t >())((::std::declval< const T& >())) ;}))
void for_each (func_t &&func) const noexcept(noexcept(((::std::declval< func_t >())((::std::declval< const T & >())))))
 
template<typename func_t >
requires (bool(requires{ (::std::declval< func_t >())((::std::declval< bucket_t& >())) ;}))
void for_each_bucket (func_t &&func) noexcept(noexcept(((::std::declval< func_t >())((::std::declval< bucket_t & >())))))
 
template<typename func_t >
requires (bool(requires{ (::std::declval< func_t >())((::std::declval< const bucket_t& >())) ;}))
void for_each_bucket (func_t &&func) const noexcept(noexcept(((::std::declval< func_t >())((::std::declval< const bucket_t & >())))))
 

静态 Public 属性

template<typename U >
static constexpr bool hash_nothrow =noexcept(hash((::std::declval< U >())))
 
template<typename U >
static constexpr bool find_nothrow =hash_nothrow<U>&&noexcept((::std::declval< bucket_t >()).find((::std::declval< U >())))
 

详细描述

template<typename T, template< typename >class stack_t = auto_stack_t, size_t bucket_max_size = 256>
class elc::defs::container::hash_table_n::hash_table_t< T, stack_t, bucket_max_size >

在文件 all_defs.cpp25400 行定义.

成员类型定义说明

◆ base_t_w

template<typename T , template< typename >class stack_t = auto_stack_t, size_t bucket_max_size = 256>
typedef array_t<bucket_t> elc::defs::container::hash_table_n::hash_table_t< T, stack_t, bucket_max_size >::base_t_w

在文件 all_defs.cpp25404 行定义.

构造及析构函数说明

◆ hash_table_t() [1/4]

template<typename T , template< typename >class stack_t = auto_stack_t, size_t bucket_max_size = 256>
elc::defs::container::hash_table_n::hash_table_t< T, stack_t, bucket_max_size >::hash_table_t ( )
inlinenoexcept

在文件 all_defs.cpp25426 行定义.

25426:_m(5){}

◆ hash_table_t() [2/4]

template<typename T , template< typename >class stack_t = auto_stack_t, size_t bucket_max_size = 256>
elc::defs::container::hash_table_n::hash_table_t< T, stack_t, bucket_max_size >::hash_table_t ( special_init_t  ,
size_t  bucket_size 
)
inlinenoexcept

在文件 all_defs.cpp25427 行定义.

25427:_m(bucket_size){}
constexpr T down_cast(U a) noexcept
向下转型至

◆ ~hash_table_t()

template<typename T , template< typename >class stack_t = auto_stack_t, size_t bucket_max_size = 256>
elc::defs::container::hash_table_n::hash_table_t< T, stack_t, bucket_max_size >::~hash_table_t ( )
defaultnoexcept

◆ hash_table_t() [3/4]

template<typename T , template< typename >class stack_t = auto_stack_t, size_t bucket_max_size = 256>
elc::defs::container::hash_table_n::hash_table_t< T, stack_t, bucket_max_size >::hash_table_t ( const this_t a)
inlinenoexcept

在文件 all_defs.cpp25433 行定义.

25433:_m(a._m){}

◆ hash_table_t() [4/4]

template<typename T , template< typename >class stack_t = auto_stack_t, size_t bucket_max_size = 256>
elc::defs::container::hash_table_n::hash_table_t< T, stack_t, bucket_max_size >::hash_table_t ( this_t &&  a)
inlinenoexcept

在文件 all_defs.cpp25434 行定义.

25434:_m(a._m){}

成员函数说明

◆ add()

template<typename T , template< typename >class stack_t = auto_stack_t, size_t bucket_max_size = 256>
void elc::defs::container::hash_table_n::hash_table_t< T, stack_t, bucket_max_size >::add ( const T &  a)
inlinenoexcept

在文件 all_defs.cpp25450 行定义.

25450 {
25451 auto&bucket=find_bucket(hash(a));
25452 bucket.add(a);
25453 if(bucket.size() > bucket_max_size)
25454 bucket_count_grow();
25455 }
#define hash

◆ clear()

template<typename T , template< typename >class stack_t = auto_stack_t, size_t bucket_max_size = 256>
void elc::defs::container::hash_table_n::hash_table_t< T, stack_t, bucket_max_size >::clear ( )
inlinenoexcept

在文件 all_defs.cpp25504 行定义.

25504 {
25505 re_construct(this);
25506 }
constexpr struct elc::defs::memory::lifetime_n::re_construct_t re_construct

◆ find()

template<typename T , template< typename >class stack_t = auto_stack_t, size_t bucket_max_size = 256>
template<typename U >
maybe_fail_reference< T > elc::defs::container::hash_table_n::hash_table_t< T, stack_t, bucket_max_size >::find ( U &&  a)
inlinenoexcept

在文件 all_defs.cpp25472 行定义.

25472 {
25473 auto&bucket=find_bucket(hash(a));
25476 if constexpr(is_unstable_hash<T>)
25477 if(reference.fail()){
25478 for(auto&i:_m){
25479 if(is_eq(i,bucket))
25480 continue;
25481 re_construct[&reference](i.find(a));
25482 if(reference.not_fail())
25483 break;
25484 }
25485 }
25487 return reference;
25488 }
if constexpr(noexcept_stream_class< stream_T >)
#define pop_msvc_warning()
Definition all_defs.cpp:478
#define push_and_disable_msvc_warning(...)
Definition all_defs.cpp:479
maybe_fail_reference< T > find(U &&a) noexcept(find_nothrow< U >)
constexpr auto is_eq(T &&a, T &&b) noexcept(noexcept((&a==&b)))
函数调用图:

◆ for_each() [1/2]

template<typename T , template< typename >class stack_t = auto_stack_t, size_t bucket_max_size = 256>
template<typename func_t >
requires (bool(requires{ (::std::declval< func_t >())((::std::declval< const T& >())) ;}))
void elc::defs::container::hash_table_n::hash_table_t< T, stack_t, bucket_max_size >::for_each ( func_t &&  func) const
inlinenoexcept

在文件 all_defs.cpp25519 行定义.

25519 {
25520 for(bucket_t&a:_m){
25521 a.for_each(func);
25522 }
25523 }

◆ for_each() [2/2]

template<typename T , template< typename >class stack_t = auto_stack_t, size_t bucket_max_size = 256>
template<typename func_t >
requires (bool(requires{ (::std::declval< func_t >())((::std::declval< T& >())) ;}))
void elc::defs::container::hash_table_n::hash_table_t< T, stack_t, bucket_max_size >::for_each ( func_t &&  func)
inlinenoexcept

在文件 all_defs.cpp25510 行定义.

25510 {
25511 for(bucket_t&a:_m){
25512 a.for_each(func);
25513 }
25514 }

◆ for_each_bucket() [1/2]

template<typename T , template< typename >class stack_t = auto_stack_t, size_t bucket_max_size = 256>
template<typename func_t >
requires (bool(requires{ (::std::declval< func_t >())((::std::declval< const bucket_t& >())) ;}))
void elc::defs::container::hash_table_n::hash_table_t< T, stack_t, bucket_max_size >::for_each_bucket ( func_t &&  func) const
inlinenoexcept

在文件 all_defs.cpp25535 行定义.

25535 {
25536 _m.for_each(func);
25537 }

◆ for_each_bucket() [2/2]

template<typename T , template< typename >class stack_t = auto_stack_t, size_t bucket_max_size = 256>
template<typename func_t >
requires (bool(requires{ (::std::declval< func_t >())((::std::declval< bucket_t& >())) ;}))
void elc::defs::container::hash_table_n::hash_table_t< T, stack_t, bucket_max_size >::for_each_bucket ( func_t &&  func)
inlinenoexcept

在文件 all_defs.cpp25528 行定义.

25528 {
25529 _m.for_each(func);
25530 }

◆ in_table()

template<typename T , template< typename >class stack_t = auto_stack_t, size_t bucket_max_size = 256>
bool elc::defs::container::hash_table_n::hash_table_t< T, stack_t, bucket_max_size >::in_table ( const T &  a)
inlinenoexcept

在文件 all_defs.cpp25489 行定义.

25489 {
25490 return find(a).not_fail();
25491 }

◆ not_in_table()

template<typename T , template< typename >class stack_t = auto_stack_t, size_t bucket_max_size = 256>
bool elc::defs::container::hash_table_n::hash_table_t< T, stack_t, bucket_max_size >::not_in_table ( const T &  a)
inlinenoexcept

在文件 all_defs.cpp25492 行定义.

25492 {
25493 return not in_table(a);
25494 }
bool in_table(const T &a) noexcept(noexcept(((::std::declval< this_t >()).find(a).not_fail())))

◆ operator base_t_w &()

template<typename T , template< typename >class stack_t = auto_stack_t, size_t bucket_max_size = 256>
elc::defs::container::hash_table_n::hash_table_t< T, stack_t, bucket_max_size >::operator base_t_w & ( )
inlinenoexcept

在文件 all_defs.cpp25430 行定义.

25430{return _m;}

◆ operator const base_t_w &()

template<typename T , template< typename >class stack_t = auto_stack_t, size_t bucket_max_size = 256>
elc::defs::container::hash_table_n::hash_table_t< T, stack_t, bucket_max_size >::operator const base_t_w & ( ) const
inlinenoexcept

在文件 all_defs.cpp25431 行定义.

25431{return _m;}

◆ operator=() [1/2]

template<typename T , template< typename >class stack_t = auto_stack_t, size_t bucket_max_size = 256>
this_t & elc::defs::container::hash_table_n::hash_table_t< T, stack_t, bucket_max_size >::operator= ( base_t_w &&  a) &
inlinenoexcept

在文件 all_defs.cpp25436 行定义.

25436 {
25437 swap(_m,a);
25438 return*this;
25439 }
函数调用图:

◆ operator=() [2/2]

template<typename T , template< typename >class stack_t = auto_stack_t, size_t bucket_max_size = 256>
this_t & elc::defs::container::hash_table_n::hash_table_t< T, stack_t, bucket_max_size >::operator= ( const base_t_w a) &
inlinenoexcept

在文件 all_defs.cpp25440 行定义.

25440 {
25441 _m=a;
25442 return*this;
25443 }

◆ remove()

template<typename T , template< typename >class stack_t = auto_stack_t, size_t bucket_max_size = 256>
bool elc::defs::container::hash_table_n::hash_table_t< T, stack_t, bucket_max_size >::remove ( const T &  a)
inlinenoexcept

在文件 all_defs.cpp25456 行定义.

25456 {
25457 auto&bucket=find_bucket(hash(a));
25458 bool remove_success=bucket.remove(a);
25459 if constexpr(is_unstable_hash<T>)
25460 if(not remove_success){
25461 for(auto&i:_m){
25462 if(is_eq(i,bucket))
25463 continue;
25464 remove_success=i.remove(a);
25465 if(remove_success)
25466 break;
25467 }
25468 }
25469 return remove_success;
25470 }
函数调用图:

◆ size()

template<typename T , template< typename >class stack_t = auto_stack_t, size_t bucket_max_size = 256>
size_t elc::defs::container::hash_table_n::hash_table_t< T, stack_t, bucket_max_size >::size ( )
inlinenoexcept

在文件 all_defs.cpp25496 行定义.

25496 {
25497 size_t aret=0;
25498 for(const bucket_t&a:_m){
25499 aret+=a.size();
25500 }
25501 return aret;
25502 }

◆ swap()

template<typename T , template< typename >class stack_t = auto_stack_t, size_t bucket_max_size = 256>
void elc::defs::container::hash_table_n::hash_table_t< T, stack_t, bucket_max_size >::swap ( base_t_w a)
inlinenoexcept

在文件 all_defs.cpp25408 行定义.

25408{_m.swap_with(a);}

类成员变量说明

◆ find_nothrow

template<typename T , template< typename >class stack_t = auto_stack_t, size_t bucket_max_size = 256>
template<typename U >
constexpr bool elc::defs::container::hash_table_n::hash_table_t< T, stack_t, bucket_max_size >::find_nothrow =hash_nothrow<U>&&noexcept((::std::declval< bucket_t >()).find((::std::declval< U >())))
staticconstexpr

在文件 all_defs.cpp25448 行定义.

◆ hash_nothrow

template<typename T , template< typename >class stack_t = auto_stack_t, size_t bucket_max_size = 256>
template<typename U >
constexpr bool elc::defs::container::hash_table_n::hash_table_t< T, stack_t, bucket_max_size >::hash_nothrow =noexcept(hash((::std::declval< U >())))
staticconstexpr

在文件 all_defs.cpp25446 行定义.


该类的文档由以下文件生成: