57 cout <<
"sparse vectors without NULL:" << endl;
70 std::cout <<
"Mismatch found." << endl;
72 std::cout <<
"Mismatch not found" << endl;
80 std::cout <<
"Mismatch found at: " << pos << endl;
87 cout << endl <<
"sparse vectors with NULL:" << endl;
101 std::cout <<
"Mismatch found." << endl;
103 std::cout <<
"Mismatch not found" << endl;
109 std::cout <<
"Mismatch found at: " << pos << endl;
121 std::cout <<
"Mismatch found at: " << pos << endl;
126 catch(std::exception& ex)
128 std::cerr << ex.what() << std::endl;
Compressed bit-vector bvector<> container, set algebraic methods, traversal iterators.
Sparse constainer sparse_vector<> for integer types using bit-transposition transform.
Algorithms for bm::sparse_vector.
pre-processor un-defines to avoid global space pollution (internal)
succinct sparse vector with runtime compression using bit-slicing / transposition method
bvector_type::size_type size_type
void set_null(size_type idx)
set specified element to unassigned value (NULL)
void push_back(value_type v)
push value back into vector
@ use_null
support "non-assigned" or "NULL" logic
bool sparse_vector_find_first_mismatch(const SV &sv1, const SV &sv2, typename SV::size_type &midx, bm::null_support null_proc=bm::use_null)
Find first mismatch (element which is different) between two sparse vectors (uses linear scan in bit-...
bm::sparse_vector< unsigned, bm::bvector<> > svector_u32