Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

basic_hash< Key, list_elem > Class Template Reference

#include <hash.h>

List of all members.

Public Types

typedef size_t size_type
typedef list_elem list_type
typedef std::vector< list_elem * > vector_type
typedef size_type(* hashfun_t )(const Key &)
typedef hash_iterator< list_elem > iterator
typedef hash_iterator< const
list_elem > 
const_iterator

Public Member Functions

 basic_hash (size_type size=31, hashfun_t f=hashfun)
 basic_hash (const basic_hash &S)
 ~basic_hash ()
basic_hashoperator= (const basic_hash &S)
iterator begin ()
iterator end ()
const_iterator const_begin () const
const_iterator begin () const
const_iterator const_end () const
const_iterator end () const
void clear ()
list_elem * find (const Key &k, list_elem ***where=0)
const list_elem * find (const Key &k) const
bool exists (const Key &k) const
list_elem * insert (const Key &k)
list_elem * insert (const list_elem *e)
list_elem * insert (const iterator &i)
bool erase (const Key &k)
bool erase (const iterator &i)
size_type size () const
size_type max_size () const
bool empty () const
void swap (basic_hash &s)
void statistics ()

Protected Attributes

vector_type v
size_type vsize
size_type n_elements
size_type n_buckets
hashfun_t hf

Private Member Functions

void construct (const basic_hash &S)
void resize (size_type new_size)
size_type next_size ()
bool resize_if_needed ()

template<class Key, class list_elem>
class basic_hash< Key, list_elem >


Member Typedef Documentation

template<class Key, class list_elem>
typedef hash_iterator<const list_elem> basic_hash< Key, list_elem >::const_iterator
 

template<class Key, class list_elem>
typedef size_type(* basic_hash< Key, list_elem >::hashfun_t)( const Key& )
 

template<class Key, class list_elem>
typedef hash_iterator<list_elem> basic_hash< Key, list_elem >::iterator
 

template<class Key, class list_elem>
typedef list_elem basic_hash< Key, list_elem >::list_type
 

Reimplemented in hash< Key, T >.

template<class Key, class list_elem>
typedef size_t basic_hash< Key, list_elem >::size_type
 

template<class Key, class list_elem>
typedef std::vector<list_elem*> basic_hash< Key, list_elem >::vector_type
 


Constructor & Destructor Documentation

template<class Key, class list_elem>
basic_hash< Key, list_elem >::basic_hash size_type  size = 31,
hashfun_t  f = hashfun
[inline]
 

template<class Key, class list_elem>
basic_hash< Key, list_elem >::basic_hash const basic_hash< Key, list_elem > &  S  )  [inline]
 

template<class Key, class list_elem>
basic_hash< Key, list_elem >::~basic_hash  )  [inline]
 


Member Function Documentation

template<class Key, class list_elem>
const_iterator basic_hash< Key, list_elem >::begin  )  const [inline]
 

template<class Key, class list_elem>
iterator basic_hash< Key, list_elem >::begin  )  [inline]
 

template<class Key, class list_elem>
void basic_hash< Key, list_elem >::clear  )  [inline]
 

template<class Key, class list_elem>
const_iterator basic_hash< Key, list_elem >::const_begin  )  const [inline]
 

template<class Key, class list_elem>
const_iterator basic_hash< Key, list_elem >::const_end  )  const [inline]
 

template<class Key, class list_elem>
void basic_hash< Key, list_elem >::construct const basic_hash< Key, list_elem > &  S  )  [inline, private]
 

template<class Key, class list_elem>
bool basic_hash< Key, list_elem >::empty  )  const [inline]
 

template<class Key, class list_elem>
const_iterator basic_hash< Key, list_elem >::end  )  const [inline]
 

template<class Key, class list_elem>
iterator basic_hash< Key, list_elem >::end  )  [inline]
 

template<class Key, class list_elem>
bool basic_hash< Key, list_elem >::erase const iterator i  )  [inline]
 

template<class Key, class list_elem>
bool basic_hash< Key, list_elem >::erase const Key &  k  )  [inline]
 

template<class Key, class list_elem>
bool basic_hash< Key, list_elem >::exists const Key &  k  )  const [inline]
 

template<class Key, class list_elem>
const list_elem* basic_hash< Key, list_elem >::find const Key &  k  )  const [inline]
 

template<class Key, class list_elem>
list_elem* basic_hash< Key, list_elem >::find const Key &  k,
list_elem ***  where = 0
[inline]
 

template<class Key, class list_elem>
list_elem* basic_hash< Key, list_elem >::insert const iterator i  )  [inline]
 

template<class Key, class list_elem>
list_elem* basic_hash< Key, list_elem >::insert const list_elem *  e  )  [inline]
 

template<class Key, class list_elem>
list_elem* basic_hash< Key, list_elem >::insert const Key &  k  )  [inline]
 

template<class Key, class list_elem>
size_type basic_hash< Key, list_elem >::max_size  )  const [inline]
 

template<class Key, class list_elem>
size_type basic_hash< Key, list_elem >::next_size  )  [inline, private]
 

template<class Key, class list_elem>
basic_hash& basic_hash< Key, list_elem >::operator= const basic_hash< Key, list_elem > &  S  )  [inline]
 

template<class Key, class list_elem>
void basic_hash< Key, list_elem >::resize size_type  new_size  )  [inline, private]
 

template<class Key, class list_elem>
bool basic_hash< Key, list_elem >::resize_if_needed  )  [inline, private]
 

template<class Key, class list_elem>
size_type basic_hash< Key, list_elem >::size  )  const [inline]
 

template<class Key, class list_elem>
void basic_hash< Key, list_elem >::statistics  ) 
 

template<class Key, class list_elem>
void basic_hash< Key, list_elem >::swap basic_hash< Key, list_elem > &  s  )  [inline]
 


Member Data Documentation

template<class Key, class list_elem>
hashfun_t basic_hash< Key, list_elem >::hf [protected]
 

template<class Key, class list_elem>
size_type basic_hash< Key, list_elem >::n_buckets [protected]
 

template<class Key, class list_elem>
size_type basic_hash< Key, list_elem >::n_elements [protected]
 

template<class Key, class list_elem>
vector_type basic_hash< Key, list_elem >::v [protected]
 

template<class Key, class list_elem>
size_type basic_hash< Key, list_elem >::vsize [protected]
 


The documentation for this class was generated from the following file:
Generated on Thu Feb 23 23:56:10 2006 for liby2util by doxygen 1.3.6