HOG2
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
FixedSizeSet< T, Hash > Class Template Reference

#include <FixedSizeSet.h>

Collaboration diagram for FixedSizeSet< T, Hash >:
Collaboration graph
[legend]

Classes

struct  field
 

Public Types

typedef fssIterator< fielditerator
 

Public Member Functions

 FixedSizeSet (size_t capacity)
 
 ~FixedSizeSet ()
 
void resize (size_t capacity)
 
void swap (FixedSizeSet< T, Hash > &s)
 
void clear ()
 
size_t size ()
 
iterator begin ()
 
iterator end () const
 
iterator find (const T &item) const
 
void erase (iterator &i)
 
void insert (const T &item)
 
void PrintStats ()
 

Private Attributes

field ** hashTable
 
fieldmemory
 
size_t currentMemoryEntry
 
size_t capacity
 
size_t hashTableSize
 
size_t removed
 
Hash h
 

Detailed Description

template<typename T, class Hash = std::hash<T>>
class FixedSizeSet< T, Hash >

Definition at line 19 of file FixedSizeSet.h.

Member Typedef Documentation

◆ iterator

template<typename T , class Hash = std::hash<T>>
typedef fssIterator<field> FixedSizeSet< T, Hash >::iterator

Definition at line 33 of file FixedSizeSet.h.

Constructor & Destructor Documentation

◆ FixedSizeSet()

template<typename T , class Hash >
FixedSizeSet< T, Hash >::FixedSizeSet ( size_t  capacity)

Definition at line 82 of file FixedSizeSet.h.

◆ ~FixedSizeSet()

template<typename T , class Hash >
FixedSizeSet< T, Hash >::~FixedSizeSet

Definition at line 95 of file FixedSizeSet.h.

Member Function Documentation

◆ begin()

template<typename T , class Hash = std::hash<T>>
iterator FixedSizeSet< T, Hash >::begin ( )
inline

Definition at line 35 of file FixedSizeSet.h.

References FixedSizeSet< T, Hash >::memory.

◆ clear()

template<typename T , class Hash >
void FixedSizeSet< T, Hash >::clear

Definition at line 131 of file FixedSizeSet.h.

◆ end()

template<typename T , class Hash = std::hash<T>>
iterator FixedSizeSet< T, Hash >::end ( ) const
inline

◆ erase()

template<typename T , class Hash >
void FixedSizeSet< T, Hash >::erase ( iterator i)

Definition at line 159 of file FixedSizeSet.h.

◆ find()

template<typename T , class Hash = std::hash<T>>
iterator FixedSizeSet< T, Hash >::find ( const T &  item) const
inline

◆ insert()

template<typename T , class Hash >
void FixedSizeSet< T, Hash >::insert ( const T &  item)

◆ PrintStats()

template<typename T , class Hash >
void FixedSizeSet< T, Hash >::PrintStats

Definition at line 140 of file FixedSizeSet.h.

References FixedSizeSet< T, Hash >::field::next.

◆ resize()

template<typename T , class Hash >
void FixedSizeSet< T, Hash >::resize ( size_t  capacity)

Definition at line 107 of file FixedSizeSet.h.

◆ size()

template<typename T , class Hash = std::hash<T>>
size_t FixedSizeSet< T, Hash >::size ( )
inline

Definition at line 32 of file FixedSizeSet.h.

References FixedSizeSet< T, Hash >::currentMemoryEntry.

◆ swap()

template<typename T , class Hash >
void FixedSizeSet< T, Hash >::swap ( FixedSizeSet< T, Hash > &  s)

Member Data Documentation

◆ capacity

template<typename T , class Hash = std::hash<T>>
size_t FixedSizeSet< T, Hash >::capacity
private

Definition at line 54 of file FixedSizeSet.h.

Referenced by FixedSizeSet< T, Hash >::swap().

◆ currentMemoryEntry

template<typename T , class Hash = std::hash<T>>
size_t FixedSizeSet< T, Hash >::currentMemoryEntry
private

◆ h

template<typename T , class Hash = std::hash<T>>
Hash FixedSizeSet< T, Hash >::h
private

Definition at line 57 of file FixedSizeSet.h.

Referenced by FixedSizeSet< T, Hash >::find().

◆ hashTable

template<typename T , class Hash = std::hash<T>>
field** FixedSizeSet< T, Hash >::hashTable
private

Definition at line 51 of file FixedSizeSet.h.

Referenced by FixedSizeSet< T, Hash >::find(), and FixedSizeSet< T, Hash >::swap().

◆ hashTableSize

template<typename T , class Hash = std::hash<T>>
size_t FixedSizeSet< T, Hash >::hashTableSize
private

Definition at line 55 of file FixedSizeSet.h.

Referenced by FixedSizeSet< T, Hash >::find(), and FixedSizeSet< T, Hash >::swap().

◆ memory

template<typename T , class Hash = std::hash<T>>
field* FixedSizeSet< T, Hash >::memory
private

◆ removed

template<typename T , class Hash = std::hash<T>>
size_t FixedSizeSet< T, Hash >::removed
private

Definition at line 56 of file FixedSizeSet.h.

Referenced by FixedSizeSet< T, Hash >::swap().


The documentation for this class was generated from the following file: