BitMagic-C++
Typedefs | Functions | Variables
strsvsample07.cpp File Reference

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"
Include dependency graph for strsvsample07.cpp:

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...
 

Detailed Description

Example: Succinct container for strings, bulk search using scanner pipeline.

Definition in file strsvsample07.cpp.

Function Documentation

◆ GenerateTestData()

static void GenerateTestData ( std::vector< string > &  str_coll,
str_sv_type str_sv,
unsigned  max_coll = 8000000,
unsigned  repeat_factor = 10 
)
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.

Examples
strsvsample07.cpp.

Definition at line 62 of file strsvsample07.cpp.

References bm::str_sparse_vector< CharType, BV, STR_SIZE >::get_back_inserter().

Referenced by main().

◆ main()

int main ( int  argc,
char *  argv[] 
)

◆ parse_args()

static void parse_args ( int  argc,
char *  argv[] 
)
static

Rudimentary cmd-args parser.

Examples
strsvsample07.cpp.

Definition at line 95 of file strsvsample07.cpp.

References is_diag.

Referenced by main().

Variable Documentation

◆ is_diag

bool is_diag = true

Flag to print the SV diagnostics.

Examples
strsvsample07.cpp.

Definition at line 91 of file strsvsample07.cpp.

Referenced by main(), and parse_args().