35 #ifndef OPENCV_FLANN_DYNAMIC_BITSET_H_
36 #define OPENCV_FLANN_DYNAMIC_BITSET_H_
40 #ifndef FLANN_USE_BOOST
41 # define FLANN_USE_BOOST 0
45 #include <boost/dynamic_bitset.hpp>
46 typedef boost::dynamic_bitset<> DynamicBitset;
64 DynamicBitset() : size_(0)
71 DynamicBitset(
size_t sz)
81 std::fill(bitset_.begin(), bitset_.end(), 0);
89 return bitset_.empty();
96 std::fill(bitset_.begin(), bitset_.end(), 0);
103 bitset_[
index / cell_bit_size_] &= ~(size_t(1) << (
index % cell_bit_size_));
111 void reset_block(
size_t index)
113 bitset_[
index / cell_bit_size_] = 0;
121 bitset_.resize(sz / cell_bit_size_ + 1);
127 void set(
size_t index)
129 bitset_[
index / cell_bit_size_] |= size_t(1) << (
index % cell_bit_size_);
143 bool test(
size_t index)
const
145 return (bitset_[
index / cell_bit_size_] & (
size_t(1) << (
index % cell_bit_size_))) != 0;
151 static const unsigned int cell_bit_size_ = CHAR_BIT *
sizeof(size_t);
int index
Definition: core_c.h:634
CvSize size
Definition: core_c.h:112
CV_EXPORTS void resize(int src_type, const uchar *src_data, size_t src_step, int src_width, int src_height, uchar *dst_data, size_t dst_step, int dst_width, int dst_height, double inv_scale_x, double inv_scale_y, int interpolation)
QTextStream & reset(QTextStream &stream)