utilmm::hash_set< Key, Hash, Equal > Class Template Reference
[Hash function based containers]

set with hashing access More...

#include <hash_set.hh>

List of all members.

Public Types

typedef
container_type::const_iterator 
const_iterator
 const iterator type
typedef
container_type::const_iterator 
const_iterator
 const iterator type
typedef container_type::iterator iterator
 iterator type
typedef container_type::iterator iterator
 iterator type
typedef container_type::value_type value_type
 Value type for cells.
typedef container_type::value_type 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
void erase (key_arg key)
 remove element
void erase (iterator const &i)
 Remove element.
void erase (iterator const &first, iterator const &last)
 Remove range.
void erase (key_arg key)
 remove element
void erase (iterator const &i)
 Remove element.
void erase (iterator const &first, iterator const &last)
 Remove range.
const_iterator find (key_arg key) const
 Search key.
iterator find (key_arg key)
 Search for element.
const_iterator find (key_arg key) const
 Search key.
iterator find (key_arg key)
 Search for element.
iterator insert (key_arg key)
 Cell insertion.
iterator insert (key_arg key)
 Cell insertion.
size_t max_size () const
 max element number
size_t max_size () const
 max element number
size_t size () const
 element count
size_t size () const
 element count
void swap (hash_set &other)
 swapping function
void swap (hash_set &other)
 swapping function

Private Types

typedef hash_toolbox::table
< Key, Key const,
key_extractor, Hash, Equal > 
container_type
typedef hash_toolbox::table
< Key, Key const,
key_extractor, Hash, Equal > 
container_type
typedef container_type::key_arg key_arg
typedef container_type::key_arg key_arg
typedef identity< Key > key_extractor
typedef identity< Key > key_extractor

Private Attributes

container_type the_table

Detailed Description

template<typename Key, class Hash = hash<Key>, class Equal = std::equal_to<Key>>
class utilmm::hash_set< Key, Hash, Equal >

set with hashing access

This is an unsorted set where elements are accessed using a hash function

Parameters:
Key the element type
Hash hashing functor fo Key
Eqaul equality functor for Key
See also:
utilmm::hash
Author:
Frédéric Py <fpy@laas.fr>

Definition at line 30 of file install/include/utilmm/hash/hash_set.hh.


Member Typedef Documentation

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
typedef container_type::const_iterator utilmm::hash_set< Key, Hash, Equal >::const_iterator

const iterator type

const iterator type The type used to iterate through this class without any modification

Definition at line 56 of file utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
typedef container_type::const_iterator utilmm::hash_set< Key, Hash, Equal >::const_iterator

const iterator type

const iterator type The type used to iterate through this class without any modification

Definition at line 56 of file install/include/utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
typedef hash_toolbox::table< Key, Key const, key_extractor, Hash, Equal > utilmm::hash_set< Key, Hash, Equal >::container_type [private]

Definition at line 34 of file utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
typedef hash_toolbox::table< Key, Key const, key_extractor, Hash, Equal > utilmm::hash_set< Key, Hash, Equal >::container_type [private]

Definition at line 34 of file install/include/utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
typedef container_type::iterator utilmm::hash_set< Key, Hash, Equal >::iterator

iterator type

iterator type The type used to iterate through and manipulate this class

Definition at line 51 of file utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
typedef container_type::iterator utilmm::hash_set< Key, Hash, Equal >::iterator

iterator type

iterator type The type used to iterate through and manipulate this class

Definition at line 51 of file install/include/utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
typedef container_type::key_arg utilmm::hash_set< Key, Hash, Equal >::key_arg [private]

Definition at line 35 of file utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
typedef container_type::key_arg utilmm::hash_set< Key, Hash, Equal >::key_arg [private]

Definition at line 35 of file install/include/utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
typedef identity<Key> utilmm::hash_set< Key, Hash, Equal >::key_extractor [private]

Definition at line 32 of file utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
typedef identity<Key> utilmm::hash_set< Key, Hash, Equal >::key_extractor [private]

Definition at line 32 of file install/include/utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
typedef container_type::value_type utilmm::hash_set< Key, Hash, Equal >::value_type

Value type for cells.

Value type for cells.

For hash_map value_type is Key

Definition at line 46 of file utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
typedef container_type::value_type utilmm::hash_set< Key, Hash, Equal >::value_type

Value type for cells.

Value type for cells.

For hash_map value_type is Key

Definition at line 46 of file install/include/utilmm/hash/hash_set.hh.


Member Function Documentation

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
const_iterator utilmm::hash_set< Key, Hash, Equal >::begin (  )  const [inline]

beginning of table

Beginning of table.

Returns:
a const iterator pointing to the beginning of the container
See also:
end() const

Definition at line 107 of file utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
iterator utilmm::hash_set< Key, Hash, Equal >::begin (  )  [inline]

beginning of table

Beginning of table.

Returns:
an iterator pointing to the beginning of the container
See also:
end()

Definition at line 93 of file utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
const_iterator utilmm::hash_set< Key, Hash, Equal >::begin (  )  const [inline]

beginning of table

Beginning of table.

Returns:
a const iterator pointing to the beginning of the container
See also:
end() const

Definition at line 107 of file install/include/utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
iterator utilmm::hash_set< Key, Hash, Equal >::begin (  )  [inline]

beginning of table

Beginning of table.

Returns:
an iterator pointing to the beginning of the container
See also:
end()

Definition at line 93 of file install/include/utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
void utilmm::hash_set< Key, Hash, Equal >::clear (  )  [inline]

Remove all elements.

remove all elements This function is strictly equivelent to erase(begin(), end())

Definition at line 183 of file utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
void utilmm::hash_set< Key, Hash, Equal >::clear (  )  [inline]

Remove all elements.

remove all elements This function is strictly equivelent to erase(begin(), end())

Definition at line 183 of file install/include/utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
bool utilmm::hash_set< Key, Hash, Equal >::empty (  )  const [inline]

Emptyness test.

Emptyness test.

Return values:
true if this instance has no element
false else
See also:
size() const

Definition at line 85 of file utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
bool utilmm::hash_set< Key, Hash, Equal >::empty (  )  const [inline]

Emptyness test.

Emptyness test.

Return values:
true if this instance has no element
false else
See also:
size() const

Definition at line 85 of file install/include/utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
const_iterator utilmm::hash_set< Key, Hash, Equal >::end (  )  const [inline]

end of table

End of table.

Returns:
an iterator pointing to the end of the container
See also:
begin()

Definition at line 114 of file utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
iterator utilmm::hash_set< Key, Hash, Equal >::end (  )  [inline]

end of table

End of table.

Returns:
an iterator pointing to the end of the container
See also:
begin()

Definition at line 100 of file utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
const_iterator utilmm::hash_set< Key, Hash, Equal >::end (  )  const [inline]

end of table

End of table.

Returns:
an iterator pointing to the end of the container
See also:
begin()

Definition at line 114 of file install/include/utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
iterator utilmm::hash_set< Key, Hash, Equal >::end (  )  [inline]

end of table

End of table.

Returns:
an iterator pointing to the end of the container
See also:
begin()

Definition at line 100 of file install/include/utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
void utilmm::hash_set< Key, Hash, Equal >::erase ( key_arg  key  )  [inline]

remove element

Parameters:
key the element to remove

This function erase, if any, the element whose value is key

Definition at line 175 of file utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
void utilmm::hash_set< Key, Hash, Equal >::erase ( iterator const &  i  )  [inline]

Remove element.

Parameters:
i The lement to remove

This function removes the element pointed by i form the table

Definition at line 165 of file utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
void utilmm::hash_set< Key, Hash, Equal >::erase ( iterator const &  first,
iterator const &  last 
) [inline]

Remove range.

Remove elements.

Parameters:
first an iterator
last an iterator

removes all the element of the table in the range [first, last [

Definition at line 156 of file utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
void utilmm::hash_set< Key, Hash, Equal >::erase ( key_arg  key  )  [inline]

remove element

Parameters:
key the element to remove

This function erase, if any, the element whose value is key

Definition at line 175 of file install/include/utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
void utilmm::hash_set< Key, Hash, Equal >::erase ( iterator const &  i  )  [inline]

Remove element.

Parameters:
i The lement to remove

This function removes the element pointed by i form the table

Definition at line 165 of file install/include/utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
void utilmm::hash_set< Key, Hash, Equal >::erase ( iterator const &  first,
iterator const &  last 
) [inline]

Remove range.

Remove elements.

Parameters:
first an iterator
last an iterator

removes all the element of the table in the range [first, last [

Definition at line 156 of file install/include/utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
const_iterator utilmm::hash_set< Key, Hash, Equal >::find ( key_arg  key  )  const [inline]

Search key.

Search for element.

Parameters:
key the element to find.

This function tries to search in table an element equal to key

Returns:
An iterator pointing to the element with value key or end() if not found.

Definition at line 135 of file utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
iterator utilmm::hash_set< Key, Hash, Equal >::find ( key_arg  key  )  [inline]

Search for element.

Parameters:
key the element to find.

This function tries to search in table an element equal to key

Returns:
An iterator pointing to the element with value key or end() if not found.

Definition at line 128 of file utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
const_iterator utilmm::hash_set< Key, Hash, Equal >::find ( key_arg  key  )  const [inline]

Search key.

Search for element.

Parameters:
key the element to find.

This function tries to search in table an element equal to key

Returns:
An iterator pointing to the element with value key or end() if not found.

Definition at line 135 of file install/include/utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
iterator utilmm::hash_set< Key, Hash, Equal >::find ( key_arg  key  )  [inline]

Search for element.

Parameters:
key the element to find.

This function tries to search in table an element equal to key

Returns:
An iterator pointing to the element with value key or end() if not found.

Definition at line 128 of file install/include/utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
iterator utilmm::hash_set< Key, Hash, Equal >::insert ( key_arg  key  )  [inline]

Cell insertion.

Parameters:
key The value to insert

This function tries to insert key in current instance. It will not insert it if there's already a cell equals to key

Returns:
An iterator pointing to cell with value key.

Definition at line 148 of file utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
iterator utilmm::hash_set< Key, Hash, Equal >::insert ( key_arg  key  )  [inline]

Cell insertion.

Parameters:
key The value to insert

This function tries to insert key in current instance. It will not insert it if there's already a cell equals to key

Returns:
An iterator pointing to cell with value key.

Definition at line 148 of file install/include/utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
size_t utilmm::hash_set< Key, Hash, Equal >::max_size (  )  const [inline]

max element number

max elmement number

Returns:
The maximum possible number of elements

Definition at line 77 of file utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
size_t utilmm::hash_set< Key, Hash, Equal >::max_size (  )  const [inline]

max element number

max elmement number

Returns:
The maximum possible number of elements

Definition at line 77 of file install/include/utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
size_t utilmm::hash_set< Key, Hash, Equal >::size (  )  const [inline]

element count

element count

Returns:
the number of element present in current container

Definition at line 70 of file utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
size_t utilmm::hash_set< Key, Hash, Equal >::size (  )  const [inline]

element count

element count

Returns:
the number of element present in current container

Definition at line 70 of file install/include/utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
void utilmm::hash_set< Key, Hash, Equal >::swap ( hash_set< Key, Hash, Equal > &  other  )  [inline]

swapping function

swapping values function This function exchange the value of current instance with the value of another instance.

Parameters:
other The other instance

Definition at line 62 of file utilmm/hash/hash_set.hh.

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
void utilmm::hash_set< Key, Hash, Equal >::swap ( hash_set< Key, Hash, Equal > &  other  )  [inline]

swapping function

swapping values function This function exchange the value of current instance with the value of another instance.

Parameters:
other The other instance

Definition at line 62 of file install/include/utilmm/hash/hash_set.hh.


Member Data Documentation

template<typename Key , class Hash = hash<Key>, class Equal = std::equal_to<Key>>
container_type utilmm::hash_set< Key, Hash, Equal >::the_table [private]

Definition at line 37 of file install/include/utilmm/hash/hash_set.hh.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


utilmm
Author(s): Sylvain Joyeux/sylvain.joyeux@m4x.org
autogenerated on Fri Jan 11 10:07:42 2013