![]() |
Templates -- Meow
1.2.9
A C++ template contains kinds of interesting classes and functions
|
一個當key相撞時會用list解決的hash_table More...
#include "HashTable.h"
Public Member Functions | |
HashTableList () | |
constructor More... | |
HashTableList (size_t size, HashFunc const &func) | |
constructor More... | |
~HashTableList () | |
destructor More... | |
HashTableList & | copyFrom (HashTableList const &b) |
copy More... | |
void | clear () |
清除資料 More... | |
void | reset (size_t size, HashFunc const &func) |
清除資料, 指定新的size與hash function More... | |
size_t | tableSize () const |
回傳table size More... | |
size_t | size () const |
回傳目前有多少element在其中 More... | |
HashFunc const & | func () const |
回傳hash function More... | |
bool | add (Data const &e) |
加入新的element More... | |
bool | add (HashTableList const &h) |
把給定的HashTableList中所有的element全加進來 More... | |
bool | del (Data const &e) |
刪除element More... | |
bool | del (HashTableList const &h) |
刪除有出現在給定的的HashTableList中的element More... | |
bool | exist (Data const &e) const |
查看某element是否已經擁有 More... | |
std::vector< Data > | all () const |
回傳所有存下來的資料 More... | |
std::vector< Data > | all (size_t index) const |
回傳所有存下來且key為index的資料 More... | |
HashTableList & | operator= (HashTableList const &h) |
same as copyFrom(h) More... | |
HashTableList & | operator+= (HashTableList const &h) |
same as add(h) More... | |
HashTableList & | operator-= (HashTableList const &h) |
same as del(h) More... | |
一個當key相撞時會用list解決的hash_table
Definition at line 15 of file HashTable.h.
|
inline |
constructor
Definition at line 23 of file HashTable.h.
|
inline |
|
inline |
destructor
Definition at line 37 of file HashTable.h.
|
inline |
加入新的element
Definition at line 95 of file HashTable.h.
|
inline |
把給定的HashTableList中所有的element全加進來
Definition at line 104 of file HashTable.h.
|
inline |
回傳所有存下來的資料
Definition at line 173 of file HashTable.h.
|
inline |
回傳所有存下來且key為index的資料
Definition at line 187 of file HashTable.h.
|
inline |
清除資料
Definition at line 52 of file HashTable.h.
|
inline |
copy
Definition at line 43 of file HashTable.h.
|
inline |
刪除element
Definition at line 117 of file HashTable.h.
|
inline |
刪除有出現在給定的的HashTableList中的element
Definition at line 132 of file HashTable.h.
|
inline |
查看某element是否已經擁有
Definition at line 160 of file HashTable.h.
|
inline |
回傳hash function
Definition at line 88 of file HashTable.h.
|
inline |
same as add(h)
Definition at line 203 of file HashTable.h.
|
inline |
same as del(h)
Definition at line 209 of file HashTable.h.
|
inline |
same as copyFrom(h)
Definition at line 198 of file HashTable.h.
|
inline |
清除資料, 指定新的size與hash function
Definition at line 61 of file HashTable.h.
|
inline |
回傳目前有多少element在其中
Definition at line 77 of file HashTable.h.
|
inline |
回傳table size
Definition at line 70 of file HashTable.h.