ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
flann::DynamicBitset Class Reference

#include <dynamic_bitset.h>

Public Member Functions

 DynamicBitset ()
 
 DynamicBitset (size_t size)
 
void clear ()
 
bool empty () const
 checks if the bitset is empty More...
 
void reset ()
 
void reset (size_t index)
 set one bit to 0 More...
 
void reset_block (size_t index)
 sets a specific bit to 0, and more bits too This function is useful when resetting a given set of bits so that the whole bitset ends up being 0: if that's the case, we don't care about setting other bits to 0 More...
 
void resize (size_t size)
 
void set (size_t index)
 
size_t size () const
 
bool test (size_t index) const
 

Detailed Description

Class re-implementing the boost version of it This helps not depending on boost, it also does not do the bound checks and has a way to reset a block for speed

Definition at line 52 of file dynamic_bitset.h.

Constructor & Destructor Documentation

◆ DynamicBitset() [1/2]

flann::DynamicBitset::DynamicBitset ( )
inline
Parameters
defaultconstructor

Definition at line 57 of file dynamic_bitset.h.

◆ DynamicBitset() [2/2]

flann::DynamicBitset::DynamicBitset ( size_t  size)
inline
Parameters
onlyconstructor we use in our code
thesize of the bitset (in bits)

Definition at line 64 of file dynamic_bitset.h.

References reset(), resize(), and size().

Member Function Documentation

◆ clear()

void flann::DynamicBitset::clear ( )
inline

Sets all the bits to 0

Definition at line 72 of file dynamic_bitset.h.

Referenced by flann::NNIndex< Distance >::setDataset().

◆ empty()

bool flann::DynamicBitset::empty ( ) const
inline

checks if the bitset is empty

Returns
true if the bitset is empty

Definition at line 80 of file dynamic_bitset.h.

◆ reset() [1/2]

void flann::DynamicBitset::reset ( )
inline

◆ reset() [2/2]

void flann::DynamicBitset::reset ( size_t  index)
inline

set one bit to 0

Parameters

Definition at line 95 of file dynamic_bitset.h.

◆ reset_block()

void flann::DynamicBitset::reset_block ( size_t  index)
inline

sets a specific bit to 0, and more bits too This function is useful when resetting a given set of bits so that the whole bitset ends up being 0: if that's the case, we don't care about setting other bits to 0

Parameters

Definition at line 106 of file dynamic_bitset.h.

◆ resize()

void flann::DynamicBitset::resize ( size_t  size)
inline
Parameters
resizethe bitset so that it contains at least size bits
size

Definition at line 114 of file dynamic_bitset.h.

References size().

Referenced by flann::NNIndex< Distance >::cleanRemovedPoints(), DynamicBitset(), flann::NNIndex< Distance >::extendDataset(), and flann::NNIndex< Distance >::removePoint().

◆ set()

void flann::DynamicBitset::set ( size_t  index)
inline
Parameters
seta bit to true
indexthe index of the bit to set to 1

Definition at line 123 of file dynamic_bitset.h.

Referenced by flann::lsh::LshTable< ElementType >::add(), and flann::NNIndex< Distance >::removePoint().

◆ size()

size_t flann::DynamicBitset::size ( ) const
inline
Parameters
givesthe number of contained bits

Definition at line 130 of file dynamic_bitset.h.

Referenced by DynamicBitset(), and resize().

◆ test()

bool flann::DynamicBitset::test ( size_t  index) const
inline
Parameters
checkif a bit is set
indexthe index of the bit to check
Returns
true if the bit is set

Definition at line 139 of file dynamic_bitset.h.

Referenced by flann::NNIndex< Distance >::cleanRemovedPoints(), flann::LinearIndex< Distance >::findNeighbors(), flann::lsh::LshTable< ElementType >::getBucketFromKey(), and flann::NNIndex< Distance >::removePoint().


The documentation for this class was generated from the following file: