aitools::bighashmap::core::external_map< T > Class Template Reference

#include <external_map.hpp>

List of all members.

Public Types

typedef cmph_map< T > base_type
typedef base_type::key_type key_type
typedef base_type::value_type value_type
typedef base_type::checksum_type checksum_type

Public Member Functions

 ~external_map ()
bool find (const key_type &key, value_type &value)

Static Public Member Functions

static external_mapopen (const bfs::path &idx_file)

Private Types

typedef value::pair
< checksum_type, value_type
entry_type
typedef value::value_traits
< entry_type
entry_traits

Private Member Functions

 external_map ()
 external_map (const bfs::path &mph_file, const bfs::path &dat_file)

Private Attributes

FILE * data_

Detailed Description

template<typename T>
class aitools::bighashmap::core::external_map< T >

This class implements a hash table with a minimal perfect hash function for addressing buckets. The hash function itself is hold in memory, whereas the table data is stored on disk. Together with the wrapper class big_hash_map this makes it possible to build very large hash maps with millions of keys. Note that this class is designed to build hash maps completely in memory as required by the CMPH library. Also filling the hash table happens in memory, because writing value to disk randomly takes too much time due to seek operations. The class big_hash_map applies a hierarchical approach on very large key sets that cannot be constructed in memory. It first subdivides the key set to smaller key sets and builds a hash map for each of these sets. Although this construction schema is a build-in feature of the CMPH library it turns out that the BRZ algorithm is much more memory consuming.

Author:
martin.trenkmann@uni-weimar.de
Version:
Id
external_map.hpp,v 1.2 2011/09/21 01:00:50 trenkman Exp

Definition at line 43 of file external_map.hpp.


Member Typedef Documentation

template<typename T >
typedef cmph_map<T> aitools::bighashmap::core::external_map< T >::base_type

Definition at line 47 of file external_map.hpp.

Reimplemented from aitools::bighashmap::core::cmph_map< T >.

Definition at line 50 of file external_map.hpp.

Definition at line 55 of file external_map.hpp.

Definition at line 54 of file external_map.hpp.

Reimplemented from aitools::bighashmap::core::cmph_map< T >.

Definition at line 48 of file external_map.hpp.

Reimplemented from aitools::bighashmap::core::cmph_map< T >.

Definition at line 49 of file external_map.hpp.


Constructor & Destructor Documentation

template<typename T >
aitools::bighashmap::core::external_map< T >::external_map (  )  [inline, private]

Definition at line 59 of file external_map.hpp.

Referenced by aitools::bighashmap::core::external_map< T >::open().

Here is the caller graph for this function:

template<typename T >
aitools::bighashmap::core::external_map< T >::external_map ( const bfs::path &  mph_file,
const bfs::path &  dat_file 
) [inline, private]

Definition at line 62 of file external_map.hpp.

References aitools::bighashmap::core::external_map< T >::data_, and aitools::util::fopen().

Here is the call graph for this function:

template<typename T >
aitools::bighashmap::core::external_map< T >::~external_map (  )  [inline]

Definition at line 70 of file external_map.hpp.

References aitools::bighashmap::core::external_map< T >::data_, and aitools::util::fclose().

Here is the call graph for this function:


Member Function Documentation

template<typename T >
bool aitools::bighashmap::core::external_map< T >::find ( const key_type key,
value_type value 
) [inline, virtual]
template<typename T >
static external_map* aitools::bighashmap::core::external_map< T >::open ( const bfs::path &  idx_file  )  [inline, static]

Definition at line 78 of file external_map.hpp.

References aitools::bighashmap::core::external_map< T >::external_map(), and aitools::util::throw_runtime_error().

Here is the call graph for this function:


Member Data Documentation

template<typename T >
FILE* aitools::bighashmap::core::external_map< T >::data_ [private]

The documentation for this class was generated from the following file:
Generated on Wed May 30 15:07:31 2012 by  doxygen 1.6.3