#include <builder.hpp>
Public Types | |
typedef cmph_map< T >::key_type | key_type |
typedef cmph_map< T >::value_type | value_type |
typedef cmph_map< T > ::checksum_type | checksum_type |
Static Public Member Functions | |
static const bfs::path | build (const bfs::path &input_dir, const bfs::path &output_dir, algorithm algo=algorithm::bdz) |
Static Public Attributes | |
static const char | key_value_delim = '\t' |
static const std::string | index_file_name |
Private Types | |
typedef value::pair < checksum_type, value_type > | entry_type |
typedef value::value_traits < entry_type > | entry_traits |
Private Member Functions | |
builder () | |
Static Private Member Functions | |
static const bfs::path | build_hashfunc (const bfs::path &key_file, algorithm algo=algorithm::bdz) |
static bfs::path | build_hashtable (const bfs::path &mph_file, const bfs::path &rec_file) |
static const bfs::path | build_map (const bfs::path &input_file, algorithm algo=algorithm::bdz) |
static const bfs::path | create_keyfile (const bfs::path &rec_file) |
static const uint64_t | get_record_count (const bfs::path &input_dir) |
static const std::vector < bfs::path > | scatter (const bfs::path &input_dir, const bfs::path &output_dir) |
Definition at line 37 of file builder.hpp.
typedef cmph_map<T>::checksum_type aitools::bighashmap::core::builder< T >::checksum_type |
Definition at line 43 of file builder.hpp.
typedef value::value_traits<entry_type> aitools::bighashmap::core::builder< T >::entry_traits [private] |
Definition at line 48 of file builder.hpp.
typedef value::pair<checksum_type, value_type> aitools::bighashmap::core::builder< T >::entry_type [private] |
Definition at line 47 of file builder.hpp.
typedef cmph_map<T>::key_type aitools::bighashmap::core::builder< T >::key_type |
Definition at line 41 of file builder.hpp.
typedef cmph_map<T>::value_type aitools::bighashmap::core::builder< T >::value_type |
Definition at line 42 of file builder.hpp.
aitools::bighashmap::core::builder< T >::builder | ( | ) | [private] |
static const bfs::path aitools::bighashmap::core::builder< T >::build | ( | const bfs::path & | input_dir, | |
const bfs::path & | output_dir, | |||
algorithm | algo = algorithm::bdz | |||
) | [inline, static] |
Definition at line 63 of file builder.hpp.
References aitools::bighashmap::core::builder< T >::build_map(), aitools::bighashmap::core::builder< T >::index_file_name, aitools::util::log_info(), aitools::bighashmap::core::builder< T >::scatter(), aitools::util::throw_runtime_error(), and aitools::util::to_string().
static const bfs::path aitools::bighashmap::core::builder< T >::build_hashfunc | ( | const bfs::path & | key_file, | |
algorithm | algo = algorithm::bdz | |||
) | [inline, static, private] |
Generates a minimal perfect hash function from the given key file. Note that the entire key file will be loaded into memory.
Definition at line 104 of file builder.hpp.
References aitools::util::fclose(), aitools::util::fopen(), and aitools::util::throw_runtime_error().
Referenced by aitools::bighashmap::core::builder< T >::build_map().
static bfs::path aitools::bighashmap::core::builder< T >::build_hashtable | ( | const bfs::path & | mph_file, | |
const bfs::path & | rec_file | |||
) | [inline, static, private] |
Definition at line 127 of file builder.hpp.
References aitools::value::value_traits< T >::copy_to(), aitools::value::pair< T1, T2 >::e2(), aitools::util::fclose(), aitools::util::fopen(), aitools::util::fwrite(), aitools::util::hash(), aitools::bighashmap::core::builder< T >::key_value_delim, aitools::value::pair< T1, T2 >::set_e1(), aitools::value::value_traits< T >::size_of(), and aitools::util::throw_runtime_error().
Referenced by aitools::bighashmap::core::builder< T >::build_map().
static const bfs::path aitools::bighashmap::core::builder< T >::build_map | ( | const bfs::path & | input_file, | |
algorithm | algo = algorithm::bdz | |||
) | [inline, static, private] |
Definition at line 183 of file builder.hpp.
References aitools::bighashmap::core::builder< T >::build_hashfunc(), aitools::bighashmap::core::builder< T >::build_hashtable(), aitools::bighashmap::core::builder< T >::create_keyfile(), and aitools::util::throw_runtime_error().
Referenced by aitools::bighashmap::core::builder< T >::build().
static const bfs::path aitools::bighashmap::core::builder< T >::create_keyfile | ( | const bfs::path & | rec_file | ) | [inline, static, private] |
Definition at line 203 of file builder.hpp.
References aitools::bighashmap::core::builder< T >::key_value_delim, and aitools::util::throw_runtime_error().
Referenced by aitools::bighashmap::core::builder< T >::build_map().
static const uint64_t aitools::bighashmap::core::builder< T >::get_record_count | ( | const bfs::path & | input_dir | ) | [inline, static, private] |
Definition at line 230 of file builder.hpp.
References aitools::util::throw_runtime_error().
Referenced by aitools::bighashmap::core::builder< T >::scatter().
static const std::vector<bfs::path> aitools::bighashmap::core::builder< T >::scatter | ( | const bfs::path & | input_dir, | |
const bfs::path & | output_dir | |||
) | [inline, static, private] |
Definition at line 256 of file builder.hpp.
References aitools::bighashmap::core::builder< T >::get_record_count(), aitools::util::hash32(), aitools::bighashmap::core::builder< T >::key_value_delim, and aitools::util::throw_runtime_error().
Referenced by aitools::bighashmap::core::builder< T >::build().
const std::string aitools::bighashmap::core::builder< T >::index_file_name [inline, static] |
Definition at line 54 of file builder.hpp.
Referenced by aitools::bighashmap::core::builder< T >::build().
const char aitools::bighashmap::core::builder< T >::key_value_delim = '\t' [static] |
Definition at line 52 of file builder.hpp.
Referenced by aitools::bighashmap::core::builder< T >::build_hashtable(), aitools::bighashmap::core::builder< T >::create_keyfile(), and aitools::bighashmap::core::builder< T >::scatter().