BitMagic-C++
|
Example: Succinct container for strings, bulk search using scanner pipeline. More...
#include <iostream>
#include <string>
#include <vector>
#include <memory>
#include <cassert>
#include <thread>
#include "bm.h"
#include "bmstrsparsevec.h"
#include "bmsparsevec_algo.h"
#include "bmtimer.h"
#include "bmdbg.h"
#include "bmundef.h"
Go to the source code of this file.
Typedefs | |
typedef bm::bvector | bvector_type |
typedef bm::str_sparse_vector< char, bvector_type, 8 > | str_sv_type |
Functions | |
static void | GenerateTestData (std::vector< string > &str_coll, str_sv_type &str_sv, unsigned max_coll=8000000, unsigned repeat_factor=10) |
Test data generation. More... | |
static void | parse_args (int argc, char *argv[]) |
Rudimentary cmd-args parser. More... | |
int | main (int argc, char *argv[]) |
More... | |
Variables | |
bool | is_diag = true |
Flag to print the SV diagnostics. More... | |
Example: Succinct container for strings, bulk search using scanner pipeline.
Definition in file strsvsample07.cpp.
|
static |
Test data generation.
max_coll - defines the number of string variants repeat_factor - how often strings should be duplicated (to simulate the compressable collections), higher repeat_factor produces more compressable vector.
Definition at line 62 of file strsvsample07.cpp.
References bm::str_sparse_vector< CharType, BV, STR_SIZE >::get_back_inserter().
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 111 of file strsvsample07.cpp.
References bm::sparse_vector_scanner< SV >::pipeline< Opt >::add(), bm::bvector< Alloc >::bit_and(), BM_DECLARE_TEMP_BLOCK, bm::sparse_vector_scanner< SV >::pipeline< Opt >::complete(), bm::bvector< Alloc >::count(), bm::count_and(), bm::bvector< Alloc >::equal(), bm::sparse_vector_scanner< SV >::find_eq_str(), GenerateTestData(), bm::sparse_vector_scanner< SV >::pipeline< Opt >::get_bv_res_vector(), is_diag, bm::str_sparse_vector< CharType, BV, STR_SIZE >::optimize(), bm::sparse_vector_scanner< SV >::pipeline< Opt >::options(), parse_args(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::remap(), bm::bvector< Alloc >::set_range(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::size(), and bm::use_null.
|
static |
Rudimentary cmd-args parser.
Definition at line 95 of file strsvsample07.cpp.
References is_diag.
Referenced by main().
bool is_diag = true |
Flag to print the SV diagnostics.
Definition at line 91 of file strsvsample07.cpp.
Referenced by main(), and parse_args().