Example of how to use bm::rsc_sparse_vector<>::const_iterator
- See also
- bm::rsc_sparse_vector
-
bm::rsc_sparse_vector::const_iterator
-
bm::rsc_sparse_vector::const_iterator::go_to
#include <iostream>
#include <vector>
using namespace std;
template<
typename SV>
void PrintSV(
const SV& sv)
{
typename SV::const_iterator it = sv.begin();
typename SV::const_iterator it_end = sv.end();
for (; it != it_end; ++it)
{
if (it.is_null())
cout << "NULL";
else
cout << *it;
cout << ", ";
}
cout << endl;
}
{
try
{
{
bit = 10;
bit = 11;
bit = 13;
bit = 14;
bit.add_null(2);
bit = 256;
bit.flush();
}
{
{
do
{
cout << "NULL";
else
cout << v;
cout << ", ";
cout << endl;
cout << it.
value() << endl;
}
}
}
catch(std::exception& ex)
{
std::cerr << ex.what() << std::endl;
return 1;
}
return 0;
}