1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
|
BitMagic Library samples
Bit-vector operations
./bvsample01 - basic operations to set/get bits with bvector<> container, find cardinality (bit count)
./bvsample02 - set algebra operations, unions, intersections, equivalence of sets, lexicographical comparison
find_first_mismatch()
./bvsample03 - use of different in-memory bitset compression options, calculate memory footprint
./bvsample04 - serialization of bvector<> to save compressed BLOB to a file or a database
./bvsample05 - use of bvector<>::enumerator - fast iterator to get bits from container
./bvsample06 - allocator example
./bvsample07 - Example how to use logical operations between arrays and bit vectors
./bvsample08 - STL interoperability and set operations with iterators
./bvsample09 - simple binary distance functions and pipeline for complex binary distance formulas
./bvsample10 - extraction of a random subset for Monte Carlo simulations
./bvsample11 - how to compute population counts for ranges in bit-vector (count_range(), count_to(), count_and())
./bvsample12 - review and comparison of different methods to set and clear bits
./bvsample14 - serialization of bvector<>, logical operations on compressed BLOBs
./bvsample15 - bvector<>::find, search for first and last set bit, dynamic range detection
./bvsample16 - bm::aggregator<> - utility class for fast logical operations on bvector<> groups
Tech.note: http://bitmagic.io/aggregator.html
./bvsample17 - rank-select operations on bvector<> using rs_index
./bvsample18 - bvector<>::bulk_insert_iterator (efficient bit-vector construction)
./bvsample19 - bvector<>::merge - merge of bit-vectors (can be used for partitioned processing)
./bvsample20 - bvector<>::shift_right() and bvector<>::insert() - bit-shifting / insertion sample
./bvsample21 - bvector<>::shift_left() and bvector<>::erase() - bit-shifting / bit delete sample
./bvsample22 - algorithms for ranges and intervals (bmintervals.h)
./bvsample23 - bm::interval_enumerator<> - iterator for interval traversal of bit-vector (bmintervals.h)
./bvsetalgebra - Tutorial for Algebra of Sets operations
Tutorial: http://bitmagic.io/set-algebra.html
./bvsample01_64 - basic operations with 64-bit bit-vectors
Sparse vector (bit-transposed sparse vector) for scalar integer types
./svsample01 - basic example of sparse_vector<> container
./svsample02 - sparse_vector<> serialization example
./svsample03 - sparse_vector<> import, join, extract methods
./svsample04 - sparse_vector<> operations with NULL-able vectors and values
./svsample05 - set transformation algorithm (image) to translate one set to another
using memory-efficient bit-transposed sparse_vector as a translation function
Tech.note: http://bitmagic.io/set2set-assoc-remap-opt.html
./svsample06 - load data and search for value(s) in sparse_vector. This sample illustrates back insert
iterator, const_iterator and bm::sparse_vector_scanner<> search class
Benchmark different search/scan methods.
Tech.note: http://bitmagic.io/sparse-vector-search.html
./svsample07 - insertion sort using bm::sparse_vector_scanner<>::lower_bound()
./svsample08 - sparse_vector<> deserialization to extract specific elements and ranges.
Example illustrates how to add bookmarks to the serialized BLOB for faster
range deserialization
RSC sparse vector (Succinct vector based on Rank-Select methods) for scalar integer types
./rscsample01 - basics of rsc_sparse_vector<> container. Load, unload, serialize.
./rscsample02 - back insert iterator for rsc_sparse_vector<> container.
Gather and range deserialization of a rank-select compressed container.
./rscsample03 - how to use rsc_sparse_vector<>::const_iterator
String sparse vector (bit-transposed sparse vector) for ASCII(z) strings
./strsvsample01 - basic example of str_sparse_vector<> container, add values, optimize, iterate
./strsvsample02 - insertion sort using str_sparse_vector<> and sparse_vector_scanner<>::lower_bound_str()
./strsvsample03 - str_sparse_vector<>::back_insert_iterator is used, then sparse vector
remap compressed and saved to disk using serialization API.
./strsvsample04 - Use str_sparse_vector<> container with NULL (unassigned) values
./strsvsample05 - Use str_sparse_vector<> container selective (gather) deserialization and range deserialization.
How to add bookmarks to the the serialized BLOB for faster range deserialization.
More complex examples to illustrate mixed techniques and use cases
./xsample01 - advanced: different methods of handling of super sparse sets. Benchmarks of set operations for each method.
Details at: http://bitmagic.io/case-ER-join.html
./xsample02 - sparse vector based counting sort and histogram construction techniques compared to std::sort()
Details at: http://bitmagic.io/hist-sort.html
./xsample03 - Search in human genome data (bioinformatics) using bm::sparse_vector<>, bm::rsc_sparse_vector<>
Details at: http://bitmagic.io/succinct-snp-search.html
./xsample04 - Fingerprint pattern matching, SHIFT-AND Bitap algorithm. Search for DNA substrings.
Details at: http://bitmagic.io/dna-search.html
./xsample04a - Fast construction of bit-indexes using bulk insert iterator, multi-threaded partitioning and merge.
Details at: http://bitmagic.io/dna-search-idx.html
./xsample05 - Example how to build a memory compressed dictionary, benchmark how fast BitMagic can search in it.
As a sample data we use a part of NED catalog of celestial objects.
Details at: http://bitmagic.io/star-search.html
./xsample06 - Example on how to use DNA 2-bit per bp compression using
sparse_vector<> and use of bm::sparse_vector_find_first_mismatch()
to create comparison function. Benchmarks for variants of mismatch search and comparison.
http://bitmagic.io/dna-compare.html
./xsample08 - Example on how to build data model for Genomics Viewer using bit-intervals and succinct
vectors. Example illustrates a toy rendering with ASCII art and data model range slicing.
http://bitmagic.io/gen-layout.html
|