Hashing based table. More...
#include <table.hh>
Public Types | |
| typedef const_iter< Key, Value, Extract, Hash, Equal > | const_iterator |
| const iterator type | |
| typedef const_iter< Key, Value, Extract, Hash, Equal > | const_iterator |
| const iterator type | |
| typedef iter< Key, Value, Extract, Hash, Equal > | iterator |
| iterator type | |
| typedef iter< Key, Value, Extract, Hash, Equal > | iterator |
| iterator type | |
| typedef arg_traits< key_type > ::type | key_arg |
| typedef arg_traits< key_type > ::type | key_arg |
| typedef Key | key_type |
| Key type. | |
| typedef Key | key_type |
| Key type. | |
| typedef size_t | size_type |
| Size type. | |
| typedef size_t | size_type |
| Size type. | |
| typedef arg_traits< value_type > ::type | value_arg |
| typedef arg_traits< value_type > ::type | value_arg |
| typedef Value | value_type |
| Value type for cells. | |
| typedef Value | value_type |
| Value type for cells. | |
Public Member Functions | |
| const_iterator | begin () const |
| Beginning of table. | |
| iterator | begin () |
| Beginning of table. | |
| const_iterator | begin () const |
| Beginning of table. | |
| iterator | begin () |
| Beginning of table. | |
| void | clear () |
| remove all elements | |
| void | clear () |
| remove all elements | |
| bool | empty () const |
| Emptyness test. | |
| bool | empty () const |
| Emptyness test. | |
| const_iterator | end () const |
| End of table. | |
| iterator | end () |
| End of table. | |
| const_iterator | end () const |
| End of table. | |
| iterator | end () |
| End of table. | |
| std::pair< const_iterator, const_iterator > | equal_range (key_arg key) const |
| equality range. | |
| std::pair< iterator, iterator > | equal_range (key_arg key) |
| equality range | |
| std::pair< const_iterator, const_iterator > | equal_range (key_arg key) const |
| equality range. | |
| std::pair< iterator, iterator > | equal_range (key_arg key) |
| equality range | |
| void | erase (iterator const &first, iterator const &last) |
| Remove elements. | |
| void | erase (iterator const &first, iterator const &last) |
| Remove elements. | |
| iterator | insert_multiple (value_arg v) |
| multiple insertion | |
| iterator | insert_multiple (value_arg v) |
| multiple insertion | |
| std::pair< iterator, bool > | insert_unique (value_arg v) |
| Unique key insertion. | |
| std::pair< iterator, bool > | insert_unique (value_arg v) |
| Unique key insertion. | |
| size_type | max_size () const |
| max elmement number | |
| size_type | max_size () const |
| max elmement number | |
| table & | operator= (table const &other) |
| Copy operator. | |
| table & | operator= (table const &other) |
| Copy operator. | |
| size_type | size () const |
| element count | |
| size_type | size () const |
| element count | |
| void | swap (table &other) |
| swapping values function | |
| void | swap (table &other) |
| swapping values function | |
| table (table const &) | |
| Copy constructor. | |
| table () | |
| Default constructor. | |
| table (table const &) | |
| Copy constructor. | |
| table () | |
| Default constructor. | |
| ~table () | |
| Copy destructor. | |
| ~table () | |
| Copy destructor. | |
Private Types | |
| typedef std::vector< node_type * > | bucket_type |
| typedef std::vector< node_type * > | bucket_type |
| typedef node< value_type > | node_type |
| typedef node< value_type > | node_type |
Private Member Functions | |
| node_type * | find_node (key_arg k) const |
| node_type ** | find_node (key_arg k) |
| node_type * | find_node (key_arg k) const |
| node_type ** | find_node (key_arg k) |
| size_t | hash_node (value_arg v) |
| size_t | hash_node (value_arg v) |
| node_type * | insert (node_type **helper, value_arg v) |
| node_type * | insert (node_type **helper, value_arg v) |
| void | resize (size_type size) |
| void | resize (size_type size) |
Static Private Member Functions | |
| static bucket_type | copy_bucket (bucket_type const &other) |
| static bucket_type | copy_bucket (bucket_type const &other) |
| static key_type const & | get_key (value_arg v) |
| static key_type const & | get_key (value_arg v) |
| static size_t | hash_key (key_arg k, size_type mod) |
| static size_t | hash_key (key_arg k, size_type mod) |
| static size_t | hash_node (value_arg v, size_type mod) |
| static size_t | hash_node (value_arg v, size_type mod) |
Private Attributes | |
| size_type | avg_bucket_count |
| bucket_type | bucket |
| size_type | node_count |
Friends | |
| class | const_iter |
| class | iter |
Hashing based table.
This class is used as internal basis for all hashing based containers presented here. It is mainly insdpired on SGI STL implementation
| Key | the entry type for this table | |
| Value | The value type for cells in table | |
| Extract | Key extractor from Value | |
| Hash | hashing functor for Key | |
| Equal | equality functor for Key |
Definition at line 46 of file install/include/utilmm/hash/bits/table.hh.
typedef std::vector<node_type *> utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::bucket_type [private] |
Definition at line 60 of file utilmm/hash/bits/table.hh.
typedef std::vector<node_type *> utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::bucket_type [private] |
Definition at line 60 of file install/include/utilmm/hash/bits/table.hh.
| typedef const_iter<Key, Value, Extract, Hash, Equal> utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::const_iterator |
const iterator type
The type used to iterate through this class without any modification
Definition at line 73 of file utilmm/hash/bits/table.hh.
| typedef const_iter<Key, Value, Extract, Hash, Equal> utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::const_iterator |
const iterator type
The type used to iterate through this class without any modification
Definition at line 73 of file install/include/utilmm/hash/bits/table.hh.
| typedef iter<Key, Value, Extract, Hash, Equal> utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::iterator |
iterator type
The type used to iterate through and manipulate this class
Definition at line 67 of file utilmm/hash/bits/table.hh.
| typedef iter<Key, Value, Extract, Hash, Equal> utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::iterator |
iterator type
The type used to iterate through and manipulate this class
Definition at line 67 of file install/include/utilmm/hash/bits/table.hh.
| typedef arg_traits<key_type>::type utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::key_arg |
Definition at line 56 of file utilmm/hash/bits/table.hh.
| typedef arg_traits<key_type>::type utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::key_arg |
Definition at line 56 of file install/include/utilmm/hash/bits/table.hh.
| typedef Key utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::key_type |
Key type.
Definition at line 51 of file utilmm/hash/bits/table.hh.
| typedef Key utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::key_type |
Key type.
Definition at line 51 of file install/include/utilmm/hash/bits/table.hh.
typedef node<value_type> utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::node_type [private] |
Definition at line 59 of file utilmm/hash/bits/table.hh.
typedef node<value_type> utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::node_type [private] |
Definition at line 59 of file install/include/utilmm/hash/bits/table.hh.
| typedef size_t utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::size_type |
Size type.
Definition at line 53 of file utilmm/hash/bits/table.hh.
| typedef size_t utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::size_type |
Size type.
Definition at line 53 of file install/include/utilmm/hash/bits/table.hh.
| typedef arg_traits<value_type>::type utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::value_arg |
Definition at line 55 of file utilmm/hash/bits/table.hh.
| typedef arg_traits<value_type>::type utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::value_arg |
Definition at line 55 of file install/include/utilmm/hash/bits/table.hh.
| typedef Value utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::value_type |
Value type for cells.
Definition at line 49 of file utilmm/hash/bits/table.hh.
| typedef Value utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::value_type |
Value type for cells.
Definition at line 49 of file install/include/utilmm/hash/bits/table.hh.
| utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::table | ( | ) |
Default constructor.
Create an empty table
| utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::table | ( | table< Key, Value, Extract, Hash, Equal > const & | ) |
Copy constructor.
| utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::~table | ( | ) |
Copy destructor.
| utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::table | ( | ) |
Default constructor.
Create an empty table
| utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::table | ( | table< Key, Value, Extract, Hash, Equal > const & | ) |
Copy constructor.
| utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::~table | ( | ) |
Copy destructor.
| const_iterator utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::begin | ( | ) | const |
Beginning of table.
| iterator utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::begin | ( | ) |
| const_iterator utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::begin | ( | ) | const |
Beginning of table.
| iterator utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::begin | ( | ) |
| void utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::clear | ( | ) |
| void utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::clear | ( | ) |
| static bucket_type utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::copy_bucket | ( | bucket_type const & | other | ) | [static, private] |
| static bucket_type utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::copy_bucket | ( | bucket_type const & | other | ) | [static, private] |
| bool utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::empty | ( | ) | const |
Emptyness test.
| true | if this instance has no element | |
| false | else |
| bool utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::empty | ( | ) | const |
Emptyness test.
| true | if this instance has no element | |
| false | else |
| const_iterator utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::end | ( | ) | const |
| iterator utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::end | ( | ) |
| const_iterator utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::end | ( | ) | const |
| iterator utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::end | ( | ) |
| std::pair< const_iterator, const_iterator > utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::equal_range | ( | key_arg | key | ) | const |
equality range.
equality range
| key | a Key |
This function tries to fuind all the elements of this table with a key equal to key
| std::pair<iterator, iterator> utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::equal_range | ( | key_arg | key | ) |
equality range
| key | a Key |
This function tries to fuind all the elements of this table with a key equal to key
| std::pair< const_iterator, const_iterator > utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::equal_range | ( | key_arg | key | ) | const |
equality range.
equality range
| key | a Key |
This function tries to fuind all the elements of this table with a key equal to key
| std::pair<iterator, iterator> utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::equal_range | ( | key_arg | key | ) |
equality range
| key | a Key |
This function tries to fuind all the elements of this table with a key equal to key
| void utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::erase | ( | iterator const & | first, | |
| iterator const & | last | |||
| ) |
Remove elements.
| first | an iterator | |
| last | an iterator |
removes all the element of the table in the range [first, last [
| void utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::erase | ( | iterator const & | first, | |
| iterator const & | last | |||
| ) |
Remove elements.
| first | an iterator | |
| last | an iterator |
removes all the element of the table in the range [first, last [
| node_type* utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::find_node | ( | key_arg | k | ) | const [private] |
| node_type** utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::find_node | ( | key_arg | k | ) | [private] |
| node_type* utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::find_node | ( | key_arg | k | ) | const [private] |
| node_type** utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::find_node | ( | key_arg | k | ) | [private] |
| static key_type const& utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::get_key | ( | value_arg | v | ) | [static, private] |
| static key_type const& utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::get_key | ( | value_arg | v | ) | [static, private] |
| static size_t utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::hash_key | ( | key_arg | k, | |
| size_type | mod | |||
| ) | [static, private] |
| static size_t utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::hash_key | ( | key_arg | k, | |
| size_type | mod | |||
| ) | [static, private] |
| size_t utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::hash_node | ( | value_arg | v | ) | [private] |
| static size_t utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::hash_node | ( | value_arg | v, | |
| size_type | mod | |||
| ) | [static, private] |
| size_t utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::hash_node | ( | value_arg | v | ) | [private] |
| static size_t utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::hash_node | ( | value_arg | v, | |
| size_type | mod | |||
| ) | [static, private] |
| node_type* utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::insert | ( | node_type ** | helper, | |
| value_arg | v | |||
| ) | [private] |
| node_type* utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::insert | ( | node_type ** | helper, | |
| value_arg | v | |||
| ) | [private] |
| iterator utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::insert_multiple | ( | value_arg | v | ) |
multiple insertion
param v The value to insert
Thsi function insert v in table
| iterator utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::insert_multiple | ( | value_arg | v | ) |
multiple insertion
param v The value to insert
Thsi function insert v in table
| std::pair<iterator, bool> utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::insert_unique | ( | value_arg | v | ) |
Unique key insertion.
| v | The value to insert |
This function tries to insert v in the table except if there's already an element whose keys is equal to the key of v
first is an iterator pointing to the element whose key is equal to the key of v and second is true if we have inserted v | std::pair<iterator, bool> utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::insert_unique | ( | value_arg | v | ) |
Unique key insertion.
| v | The value to insert |
This function tries to insert v in the table except if there's already an element whose keys is equal to the key of v
first is an iterator pointing to the element whose key is equal to the key of v and second is true if we have inserted v | size_type utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::max_size | ( | ) | const |
max elmement number
| size_type utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::max_size | ( | ) | const |
max elmement number
| table& utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::operator= | ( | table< Key, Value, Extract, Hash, Equal > const & | other | ) |
Copy operator.
| table& utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::operator= | ( | table< Key, Value, Extract, Hash, Equal > const & | other | ) |
Copy operator.
| void utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::resize | ( | size_type | size | ) | [private] |
| void utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::resize | ( | size_type | size | ) | [private] |
| size_type utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::size | ( | ) | const |
element count
| size_type utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::size | ( | ) | const |
element count
| void utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::swap | ( | table< Key, Value, Extract, Hash, Equal > & | other | ) |
swapping values function
This function exchange the value of current instance with the value of another instance.
| other | The other instance |
| void utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::swap | ( | table< Key, Value, Extract, Hash, Equal > & | other | ) |
swapping values function
This function exchange the value of current instance with the value of another instance.
| other | The other instance |
const_iter [friend] |
Definition at line 231 of file install/include/utilmm/hash/bits/table.hh.
iter [friend] |
Definition at line 228 of file install/include/utilmm/hash/bits/table.hh.
size_type utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::avg_bucket_count [private] |
Definition at line 210 of file install/include/utilmm/hash/bits/table.hh.
bucket_type utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::bucket [private] |
Definition at line 209 of file install/include/utilmm/hash/bits/table.hh.
size_type utilmm::hash_toolbox::table< Key, Value, Extract, Hash, Equal >::node_count [private] |
Definition at line 210 of file install/include/utilmm/hash/bits/table.hh.