MeshLib C++ Docs
Loading...
Searching...
No Matches
MRBitSet.h File Reference
#include "MRMeshFwd.h"
#include "MRId.h"
#include "MRphmap.h"
#include "MRVector.h"
#include "MRPch/MRBindingMacros.h"
#include <boost/dynamic_bitset.hpp>
#include <iterator>
#include <functional>

Go to the source code of this file.

Classes

class  MR::BitSet
 container of bits More...
 
class  MR::TypedBitSet< I >
 container of bits representing specific indices (faces, verts or edges) More...
 
class  MR::SetBitIteratorT< T >
 iterator to enumerate all indices with set bits in BitSet class or its derivatives More...
 

Namespaces

namespace  MR
 

Macros

#define BOOST_DYNAMIC_BITSET_DONT_USE_FRIENDS
 

Functions

size_t MR::heapBytes (const BitSet &bs)
 returns the amount of memory given BitSet occupies on heap
 
MRMESH_API bool MR::operator== (const BitSet &a, const BitSet &b)
 compare that two bit sets have the same set bits (they can be equal even if sizes are distinct but last bits are off)
 
template<typename I >
bool MR::operator== (const TypedBitSet< I > &a, const TypedBitSet< I > &b)
 
template<typename T , typename U >
void MR::operator== (const TypedBitSet< T > &a, const TypedBitSet< U > &b)=delete
 prohibit comparison of unrelated sets
 
template<typename I >
std::function< bool(I)> MR::makePredicate (const TypedBitSet< I > *bitset)
 
template<typename I >
std::function< bool(I)> MR::makePredicate (const TypedBitSet< I > &bitset)
 
template<typename I >
bool MR::contains (const TypedBitSet< I > *bitset, I id)
 
template<typename I >
bool MR::contains (const TypedBitSet< I > &bitset, I id)
 
template<typename T >
MR_BIND_IGNORE bool MR::operator== (const SetBitIteratorT< T > &a, const SetBitIteratorT< T > &b)
 
template<typename T >
MR_BIND_IGNORE bool MR::operator!= (const SetBitIteratorT< T > &a, const SetBitIteratorT< T > &b)
 
MR_BIND_IGNORE auto MR::begin (const BitSet &a)
 
MR_BIND_IGNORE auto MR::end (const BitSet &)
 
template<typename I >
MR_BIND_IGNORE auto MR::begin (const TypedBitSet< I > &a)
 
template<typename I >
MR_BIND_IGNORE auto MR::end (const TypedBitSet< I > &)
 
template<typename I >
Vector< int, I > MR::makeVectorWithSeqNums (const TypedBitSet< I > &bs)
 creates a Vector where for each set bit of input bitset its sequential number starting from 0 is returned; and -1 for reset bits
 
template<typename I >
HashMap< I, int > MR::makeHashMapWithSeqNums (const TypedBitSet< I > &bs)
 creates a HashMap where for each set bit of input bitset its sequential number starting from 0 is returned
 
BitSet MR::operator& (const BitSet &a, const BitSet &b)
 
BitSet MR::operator| (const BitSet &a, const BitSet &b)
 
BitSet MR::operator^ (const BitSet &a, const BitSet &b)
 
BitSet MR::operator- (const BitSet &a, const BitSet &b)
 

Macro Definition Documentation

◆ BOOST_DYNAMIC_BITSET_DONT_USE_FRIENDS

#define BOOST_DYNAMIC_BITSET_DONT_USE_FRIENDS