Example of how to get random subset of a bit-vector
- See also
- bm::random_subset
#include <iostream>
{
if (first == last)
cout << "<EMPTY SET>";
else
for(;first != last; ++first)
cout << *first << ";";
cout << endl;
}
{
try
{
for (i = 0; i < 30000; i+=10)
{
}
for (i = 300000; i < 400000; i+=100)
{
}
rand_sampler.
sample(bvsubset1, bv, 20);
rand_sampler.
sample(bvsubset2, bv, 20);
cout << endl;
}
catch(std::exception& ex)
{
std::cerr << ex.what() << std::endl;
return 1;
}
return 0;
}