MeshLib
 
Loading...
Searching...
No Matches
MRMesh/MRBitSet.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
4#include "MRId.h"
5#include "MRphmap.h"
6#include "MRVector.h"
7#define BOOST_DYNAMIC_BITSET_DONT_USE_FRIENDS
8#pragma warning(push)
9#pragma warning(disable: 4643) //Forward declaring in namespace std is not permitted by the C++ Standard.
10#include <boost/dynamic_bitset.hpp>
11#pragma warning(pop)
12#include <iterator>
13#include <functional>
14
15namespace MR
16{
17
25class BitSet : public boost::dynamic_bitset<std::uint64_t>
26{
27public:
28 using base = boost::dynamic_bitset<std::uint64_t>;
29 using base::base;
30 using IndexType = size_t;
31
33 explicit BitSet( size_t numBits, bool fillValue ) { resize( numBits, fillValue ); }
34
35 // all bits after size() we silently consider as not-set
36 [[nodiscard]] bool test( IndexType n ) const { return n < size() && base::test( n ); }
37 [[nodiscard]] bool test_set( IndexType n, bool val = true ) { return ( val || n < size() ) ? base::test_set( n, val ) : false; }
38 BitSet & set( IndexType n, size_type len, bool val ) { base::set( n, len, val ); return * this; }
39 BitSet & set( IndexType n, bool val = true ) { base::set( n, val ); return * this; }
40 BitSet & set() { base::set(); return * this; }
41 BitSet & reset( IndexType n, size_type len ) { if ( n < size() ) base::reset( n, len ); return * this; }
42 BitSet & reset( IndexType n ) { if ( n < size() ) base::reset( n ); return * this; }
43 BitSet & reset() { base::reset(); return * this; }
44 BitSet & flip( IndexType n, size_type len ) { base::flip( n, len ); return * this; }
45 BitSet & flip( IndexType n ) { base::flip( n ); return * this; }
46 BitSet & flip() { base::flip(); return * this; }
47
53 MRMESH_API BitSet & subtract( const BitSet & b, int bShiftInBlocks );
54
56 [[nodiscard]] MRMESH_API IndexType find_last() const;
58 [[nodiscard]] MRMESH_API size_t nthSetBit( size_t n ) const;
59
61 void resizeWithReserve( size_t newSize )
62 {
63 auto reserved = capacity();
64 if ( reserved > 0 && newSize > reserved )
65 {
66 while ( newSize > reserved )
67 reserved <<= 1;
68 reserve( reserved );
69 }
70 resize( newSize );
71 }
72
74 void autoResizeSet( size_t pos, size_type len, bool val = true )
75 {
76 if ( pos + len > size() )
77 resizeWithReserve( pos + len );
78 set( pos, len, val );
79 }
80 void autoResizeSet( size_t pos, bool val = true ) { autoResizeSet( pos, 1, val ); }
81
83 [[nodiscard]] bool autoResizeTestSet( size_t pos, bool val = true )
84 {
85 bool const b = test( pos );
86 if ( b != val )
87 autoResizeSet( pos, val );
88 return b;
89 }
90
92 [[nodiscard]] size_t heapBytes() const { return capacity() / 8; }
93
95 [[nodiscard]] IndexType backId() const { assert( !empty() ); return IndexType{ size() - 1 }; }
96
98 [[nodiscard]] static IndexType beginId() { return IndexType{ 0 }; }
99 [[nodiscard]] IndexType endId() const { return IndexType{ size() }; }
100
101 // Normally those are inherited from `boost::dynamic_bitset`, but MRBind currently chokes on it, so we provide those manually.
102 #if defined(MR_PARSING_FOR_PB11_BINDINGS) || defined(MR_COMPILING_PB11_BINDINGS)
103 std::size_t size() const { return dynamic_bitset::size(); }
104 std::size_t count() const { return dynamic_bitset::count(); }
105 void resize( std::size_t num_bits, bool value = false ) { dynamic_bitset::resize( num_bits, value ); }
106 void clear() { dynamic_bitset::clear(); }
107 void push_back( bool bit ) { dynamic_bitset::push_back( bit ); }
108 void pop_back() { dynamic_bitset::pop_back(); }
109 #endif
110};
111
113template <typename T>
114class TaggedBitSet : public BitSet
115{
116 using base = BitSet;
117public:
118 using base::base;
120
121 TaggedBitSet & set( IndexType n, size_type len, bool val ) { base::set( n, len, val ); return * this; }
122 TaggedBitSet & set( IndexType n, bool val = true ) { base::set( n, val ); return * this; }
123 TaggedBitSet & set() { base::set(); return * this; }
124 TaggedBitSet & reset( IndexType n, size_type len ) { base::reset( n, len ); return * this; }
125 TaggedBitSet & reset( IndexType n ) { base::reset( n ); return * this; }
126 TaggedBitSet & reset() { base::reset(); return * this; }
127 TaggedBitSet & flip( IndexType n, size_type len ) { base::flip( n, len ); return * this; }
128 TaggedBitSet & flip( IndexType n ) { base::flip( n ); return * this; }
129 TaggedBitSet & flip() { base::flip(); return * this; }
130 [[nodiscard]] bool test( IndexType n ) const { return base::test( n ); }
131 [[nodiscard]] bool test_set( IndexType n, bool val = true ) { return base::test_set( n, val ); }
132
133 #ifndef MR_PARSING_FOR_PB11_BINDINGS // Disable for python bindings, because MRBind chokes on `boost::dynamic_bitset::reference`.
134 [[nodiscard]] reference operator[]( IndexType pos ) { return base::operator[]( pos ); }
135 #endif
136 [[nodiscard]] bool operator[]( IndexType pos ) const { return base::operator[]( pos ); }
137
138 [[nodiscard]] IndexType find_first() const { return IndexType( base::find_first() ); }
139 [[nodiscard]] IndexType find_next( IndexType pos ) const { return IndexType( base::find_next( pos ) ); }
140 [[nodiscard]] IndexType find_last() const { return IndexType( base::find_last() ); }
142 [[nodiscard]] IndexType nthSetBit( size_t n ) const { return IndexType( base::nthSetBit( n ) ); }
143
144 TaggedBitSet & operator &= ( const TaggedBitSet & b ) { base::operator &= ( b ); return * this; }
145 TaggedBitSet & operator |= ( const TaggedBitSet & b ) { base::operator |= ( b ); return * this; }
146 TaggedBitSet & operator ^= ( const TaggedBitSet & b ) { base::operator ^= ( b ); return * this; }
147 TaggedBitSet & operator -= ( const TaggedBitSet & b ) { base::operator -= ( b ); return * this; }
149 TaggedBitSet & subtract( const TaggedBitSet & b, int bShiftInBlocks ) { base::subtract( b, bShiftInBlocks ); return * this; }
150
151 void autoResizeSet( IndexType pos, size_type len, bool val = true ) { base::autoResizeSet( pos, len, val ); }
152 void autoResizeSet( IndexType pos, bool val = true ) { base::autoResizeSet( pos, val ); }
153 [[nodiscard]] bool autoResizeTestSet( IndexType pos, bool val = true ) { return base::autoResizeTestSet( pos, val ); }
154
156 template <typename M>
157 [[nodiscard]] TaggedBitSet getMapping( const M & map ) const;
158 [[nodiscard]] TaggedBitSet getMapping( const Vector<IndexType, IndexType> & map ) const
159 { return getMapping( [&map]( IndexType i ) { return map[i]; } ); }
160 [[nodiscard]] TaggedBitSet getMapping( const BMap<IndexType, IndexType> & map ) const
161 { return getMapping( [&map]( IndexType i ) { return map.b[i]; }, map.tsize ); }
162 [[nodiscard]] TaggedBitSet getMapping( const HashMap<IndexType, IndexType> & map ) const
163 { return getMapping( [&map]( IndexType i ) { return getAt( map, i ); } ); }
165 template <typename M>
166 [[nodiscard]] TaggedBitSet getMapping( const M & map, size_t resSize ) const;
167 [[nodiscard]] TaggedBitSet getMapping( const Vector<IndexType, IndexType> & map, size_t resSize ) const
168 { return getMapping( [&map]( IndexType i ) { return map[i]; }, resSize ); }
169 [[nodiscard]] TaggedBitSet getMapping( const HashMap<IndexType, IndexType> & map, size_t resSize ) const
170 { return getMapping( [&map]( IndexType i ) { return getAt( map, i ); }, resSize ); }
171
173 [[nodiscard]] IndexType backId() const { assert( !empty() ); return IndexType{ size() - 1 }; }
174
176 [[nodiscard]] static IndexType beginId() { return IndexType{ size_t( 0 ) }; }
177 [[nodiscard]] IndexType endId() const { return IndexType{ size() }; }
178};
179
181[[nodiscard]] MRMESH_API bool operator == ( const BitSet & a, const BitSet & b );
182template <typename T>
183[[nodiscard]] inline bool operator == ( const TaggedBitSet<T> & a, const TaggedBitSet<T> & b )
184 { return static_cast<const BitSet &>( a ) == static_cast<const BitSet &>( b ); }
186template <typename T, typename U>
187void operator == ( const TaggedBitSet<T> & a, const TaggedBitSet<U> & b ) = delete;
188
189template <typename T>
190[[nodiscard]] inline std::function<bool( Id<T> )> makePredicate( const TaggedBitSet<T> * bitset )
191{
192 std::function<bool( Id<T> )> res;
193 if ( bitset )
194 res = [bitset]( Id<T> id ) { return bitset->test( id ); };
195 return res;
196}
197
198template <typename T>
199[[nodiscard]] inline std::function<bool( Id<T> )> makePredicate( const TaggedBitSet<T> & bitset )
200 { return makePredicate( &bitset ); }
201
202template <typename T>
203[[nodiscard]] inline bool contains( const TaggedBitSet<T> * bitset, Id<T> id )
204{
205 return id.valid() && ( !bitset || bitset->test( id ) );
206}
207
208template <typename T>
209[[nodiscard]] inline bool contains( const TaggedBitSet<T> & bitset, Id<T> id )
210{
211 return id.valid() && bitset.test( id );
212}
213
215template <typename T>
217{
218public:
219 using IndexType = typename T::IndexType;
220
221 using iterator_category = std::forward_iterator_tag;
223 using difference_type = std::ptrdiff_t;
224 using reference = const IndexType;
225 using pointer = const IndexType *;
226
228 SetBitIteratorT() = default;
231 : bitset_( &bitset ), index_( bitset.find_first() )
232 {
233 }
235 {
236 index_ = bitset_->find_next( index_ );
237 return * this;
238 }
239 [[nodiscard]] SetBitIteratorT operator++( int )
240 {
241 SetBitIteratorT ret = *this;
242 operator++();
243 return ret;
244 }
245
246 [[nodiscard]] const T * bitset() const { return bitset_; }
247 [[nodiscard]] reference operator *() const { return index_; }
248
249private:
250 const T * bitset_ = nullptr;
251 IndexType index_ = IndexType( ~size_t( 0 ) );
252};
253
254template <typename T>
255[[nodiscard]] inline bool operator ==( const SetBitIteratorT<T> & a, const SetBitIteratorT<T> & b )
256 { return *a == *b; }
257
258template <typename T>
259[[nodiscard]] inline bool operator !=( const SetBitIteratorT<T> & a, const SetBitIteratorT<T> & b )
260 { return *a != *b; }
261
262
263[[nodiscard]] inline auto begin( const BitSet & a )
264 { return SetBitIteratorT<BitSet>(a); }
265[[nodiscard]] inline auto end( const BitSet & )
266 { return SetBitIteratorT<BitSet>(); }
267
268template <typename T>
269[[nodiscard]] inline auto begin( const TaggedBitSet<T> & a )
270 { return SetBitIteratorT<TaggedBitSet<T>>(a); }
271template <typename T>
272[[nodiscard]] inline auto end( const TaggedBitSet<T> & )
274
276template <typename T>
278{
279 Vector<int, Id<T>> res( bs.size(), -1 );
280 int n = 0;
281 for ( auto v : bs )
282 res[v] = n++;
283 return res;
284}
285
287template <typename T>
288[[nodiscard]] HashMap<Id<T>, int> makeHashMapWithSeqNums( const TaggedBitSet<T> & bs )
289{
290 HashMap<Id<T>, int> res;
291 int n = 0;
292 for ( auto v : bs )
293 res[v] = n++;
294 return res;
295}
296
297template <typename T>
298template <typename M>
299[[nodiscard]] TaggedBitSet<T> TaggedBitSet<T>::getMapping( const M & map ) const
300{
301 TaggedBitSet<T> res;
302 for ( auto b : *this )
303 if ( auto mapped = map( b ) )
304 res.autoResizeSet( mapped );
305 return res;
306}
307
308template <typename T>
309template <typename M>
310[[nodiscard]] TaggedBitSet<T> TaggedBitSet<T>::getMapping( const M & map, size_t resSize ) const
311{
312 TaggedBitSet<T> res;
313 if ( !any() )
314 return res;
315 res.resize( resSize );
316 for ( auto b : *this )
317 if ( auto mapped = map( b ) )
318 res.set( mapped );
319 return res;
320}
321
322[[nodiscard]] inline BitSet operator & ( const BitSet & a, const BitSet & b ) { BitSet res{ a }; res &= b; return res; }
323[[nodiscard]] inline BitSet operator | ( const BitSet & a, const BitSet & b ) { BitSet res{ a }; res |= b; return res; }
324[[nodiscard]] inline BitSet operator ^ ( const BitSet & a, const BitSet & b ) { BitSet res{ a }; res ^= b; return res; }
325[[nodiscard]] inline BitSet operator - ( const BitSet & a, const BitSet & b ) { BitSet res{ a }; res -= b; return res; }
326
327template <typename T> [[nodiscard]] inline TaggedBitSet<T> operator & ( const TaggedBitSet<T> & a, const TaggedBitSet<T> & b ) { auto res{ a }; res &= b; return res; }
328template <typename T> [[nodiscard]] inline TaggedBitSet<T> operator | ( const TaggedBitSet<T> & a, const TaggedBitSet<T> & b ) { auto res{ a }; res |= b; return res; }
329template <typename T> [[nodiscard]] inline TaggedBitSet<T> operator ^ ( const TaggedBitSet<T> & a, const TaggedBitSet<T> & b ) { auto res{ a }; res ^= b; return res; }
330template <typename T> [[nodiscard]] inline TaggedBitSet<T> operator - ( const TaggedBitSet<T> & a, const TaggedBitSet<T> & b ) { auto res{ a }; res -= b; return res; }
331
333
334} // namespace MR
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
container of bits
Definition MRMesh/MRBitSet.h:26
size_t IndexType
Definition MRMesh/MRBitSet.h:30
IndexType endId() const
Definition MRMesh/MRBitSet.h:99
boost::dynamic_bitset< std::uint64_t > base
Definition MRMesh/MRBitSet.h:28
static IndexType beginId()
[beginId(), endId()) is the range of all bits in the set
Definition MRMesh/MRBitSet.h:98
MRMESH_API IndexType find_last() const
return the highest index i such as bit i is set, or npos if *this has no on bits.
BitSet & reset()
Definition MRMesh/MRBitSet.h:43
MRMESH_API size_t nthSetBit(size_t n) const
returns the location of nth set bit (where the first bit corresponds to n=0) or npos if there are les...
MRMESH_API BitSet & subtract(const BitSet &b, int bShiftInBlocks)
subtracts b from this, considering that bits in b are shifted right on bShiftInBlocks*bits_per_block
MRMESH_API BitSet & operator-=(const BitSet &b)
BitSet & set(IndexType n, size_type len, bool val)
Definition MRMesh/MRBitSet.h:38
BitSet & set()
Definition MRMesh/MRBitSet.h:40
void autoResizeSet(size_t pos, bool val=true)
Definition MRMesh/MRBitSet.h:80
BitSet & reset(IndexType n, size_type len)
Definition MRMesh/MRBitSet.h:41
BitSet & set(IndexType n, bool val=true)
Definition MRMesh/MRBitSet.h:39
bool autoResizeTestSet(size_t pos, bool val=true)
same as autoResizeSet and returns previous value of pos-bit
Definition MRMesh/MRBitSet.h:83
bool test_set(IndexType n, bool val=true)
Definition MRMesh/MRBitSet.h:37
BitSet & flip(IndexType n, size_type len)
Definition MRMesh/MRBitSet.h:44
BitSet & reset(IndexType n)
Definition MRMesh/MRBitSet.h:42
bool test(IndexType n) const
Definition MRMesh/MRBitSet.h:36
BitSet & flip()
Definition MRMesh/MRBitSet.h:46
void autoResizeSet(size_t pos, size_type len, bool val=true)
sets elements [pos, pos+len) to given value, adjusting the size of the set to include new elements
Definition MRMesh/MRBitSet.h:74
IndexType backId() const
returns the identifier of the back() element
Definition MRMesh/MRBitSet.h:95
void resizeWithReserve(size_t newSize)
doubles reserved memory until resize(newSize) can be done without reallocation
Definition MRMesh/MRBitSet.h:61
size_t heapBytes() const
returns the amount of memory this object occupies on heap
Definition MRMesh/MRBitSet.h:92
BitSet(size_t numBits, bool fillValue)
creates bitset of given size filled with given value
Definition MRMesh/MRBitSet.h:33
MRMESH_API BitSet & operator|=(const BitSet &b)
MRMESH_API BitSet & operator^=(const BitSet &b)
MRMESH_API BitSet & operator&=(const BitSet &b)
BitSet & flip(IndexType n)
Definition MRMesh/MRBitSet.h:45
Definition MRMesh/MRId.h:13
iterator to enumerate all indices with set bits in BitSet class or its derivatives
Definition MRMesh/MRBitSet.h:217
SetBitIteratorT operator++(int)
Definition MRMesh/MRBitSet.h:239
const IndexType * pointer
Definition MRMesh/MRBitSet.h:225
SetBitIteratorT()=default
constructs end iterator
std::forward_iterator_tag iterator_category
Definition MRMesh/MRBitSet.h:221
const T * bitset() const
Definition MRMesh/MRBitSet.h:246
IndexType value_type
Definition MRMesh/MRBitSet.h:222
const IndexType reference
intentionally not a reference
Definition MRMesh/MRBitSet.h:224
typename T::IndexType IndexType
Definition MRMesh/MRBitSet.h:219
reference operator*() const
Definition MRMesh/MRBitSet.h:247
SetBitIteratorT & operator++()
Definition MRMesh/MRBitSet.h:234
SetBitIteratorT(const T &bitset)
constructs begin iterator
Definition MRMesh/MRBitSet.h:230
std::ptrdiff_t difference_type
Definition MRMesh/MRBitSet.h:223
container of bits representing specific indices (faces, verts or edges)
Definition MRMesh/MRBitSet.h:115
TaggedBitSet & operator^=(const TaggedBitSet &b)
Definition MRMesh/MRBitSet.h:146
TaggedBitSet getMapping(const Vector< IndexType, IndexType > &map, size_t resSize) const
Definition MRMesh/MRBitSet.h:167
bool test_set(IndexType n, bool val=true)
Definition MRMesh/MRBitSet.h:131
TaggedBitSet & operator-=(const TaggedBitSet &b)
Definition MRMesh/MRBitSet.h:147
bool test(IndexType n) const
Definition MRMesh/MRBitSet.h:130
TaggedBitSet & operator|=(const TaggedBitSet &b)
Definition MRMesh/MRBitSet.h:145
TaggedBitSet & reset(IndexType n, size_type len)
Definition MRMesh/MRBitSet.h:124
bool autoResizeTestSet(IndexType pos, bool val=true)
Definition MRMesh/MRBitSet.h:153
IndexType endId() const
Definition MRMesh/MRBitSet.h:177
reference operator[](IndexType pos)
Definition MRMesh/MRBitSet.h:134
TaggedBitSet & flip()
Definition MRMesh/MRBitSet.h:129
void autoResizeSet(IndexType pos, size_type len, bool val=true)
Definition MRMesh/MRBitSet.h:151
IndexType find_next(IndexType pos) const
Definition MRMesh/MRBitSet.h:139
TaggedBitSet & reset(IndexType n)
Definition MRMesh/MRBitSet.h:125
IndexType find_first() const
Definition MRMesh/MRBitSet.h:138
TaggedBitSet & set(IndexType n, size_type len, bool val)
Definition MRMesh/MRBitSet.h:121
IndexType find_last() const
Definition MRMesh/MRBitSet.h:140
TaggedBitSet & subtract(const TaggedBitSet &b, int bShiftInBlocks)
subtracts b from this, considering that bits in b are shifted right on bShiftInBlocks*bits_per_block
Definition MRMesh/MRBitSet.h:149
TaggedBitSet & flip(IndexType n)
Definition MRMesh/MRBitSet.h:128
TaggedBitSet getMapping(const M &map) const
constructs another bit set from this where every set bit index is transformed using given map
TaggedBitSet getMapping(const Vector< IndexType, IndexType > &map) const
Definition MRMesh/MRBitSet.h:158
TaggedBitSet & operator&=(const TaggedBitSet &b)
Definition MRMesh/MRBitSet.h:144
TaggedBitSet & set()
Definition MRMesh/MRBitSet.h:123
TaggedBitSet getMapping(const HashMap< IndexType, IndexType > &map) const
Definition MRMesh/MRBitSet.h:162
IndexType backId() const
returns the identifier of the back() element
Definition MRMesh/MRBitSet.h:173
TaggedBitSet getMapping(const BMap< IndexType, IndexType > &map) const
Definition MRMesh/MRBitSet.h:160
bool operator[](IndexType pos) const
Definition MRMesh/MRBitSet.h:136
TaggedBitSet getMapping(const HashMap< IndexType, IndexType > &map, size_t resSize) const
Definition MRMesh/MRBitSet.h:169
static IndexType beginId()
[beginId(), endId()) is the range of all bits in the set
Definition MRMesh/MRBitSet.h:176
IndexType nthSetBit(size_t n) const
returns the location of nth set bit (where the first bit corresponds to n=0) or IndexType(npos) if th...
Definition MRMesh/MRBitSet.h:142
void autoResizeSet(IndexType pos, bool val=true)
Definition MRMesh/MRBitSet.h:152
TaggedBitSet & reset()
Definition MRMesh/MRBitSet.h:126
TaggedBitSet getMapping(const M &map, size_t resSize) const
this is a faster version if the result size is known beforehand
Id< T > IndexType
Definition MRMesh/MRBitSet.h:119
TaggedBitSet & set(IndexType n, bool val=true)
Definition MRMesh/MRBitSet.h:122
TaggedBitSet & flip(IndexType n, size_type len)
Definition MRMesh/MRBitSet.h:127
std::vector<T>-like container that requires specific indexing type,
Definition MRMesh/MRVector.h:19
BitSet operator-(const BitSet &a, const BitSet &b)
Definition MRMesh/MRBitSet.h:325
auto begin(const BitSet &a)
Definition MRMesh/MRBitSet.h:263
MRMESH_API bool 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 la...
auto end(const BitSet &)
Definition MRMesh/MRBitSet.h:265
BitSet operator&(const BitSet &a, const BitSet &b)
Definition MRMesh/MRBitSet.h:322
std::function< bool(Id< T >)> makePredicate(const TaggedBitSet< T > *bitset)
Definition MRMesh/MRBitSet.h:190
Vector< int, Id< T > > makeVectorWithSeqNums(const TaggedBitSet< T > &bs)
creates a Vector where for each set bit of input bitset its sequential number starting from 0 is retu...
Definition MRMesh/MRBitSet.h:277
BitSet operator|(const BitSet &a, const BitSet &b)
Definition MRMesh/MRBitSet.h:323
BitSet operator^(const BitSet &a, const BitSet &b)
Definition MRMesh/MRBitSet.h:324
bool contains(const TaggedBitSet< T > *bitset, Id< T > id)
Definition MRMesh/MRBitSet.h:203
HashMap< Id< T >, int > makeHashMapWithSeqNums(const TaggedBitSet< T > &bs)
creates a HashMap where for each set bit of input bitset its sequential number starting from 0 is ret...
Definition MRMesh/MRBitSet.h:288
bool operator!=(const SetBitIteratorT< T > &a, const SetBitIteratorT< T > &b)
Definition MRMesh/MRBitSet.h:259
Definition MRCameraOrientationPlugin.h:7
class MRMESH_CLASS BitSet
Definition MRMesh/MRMeshFwd.h:101
ImVec2 size(const ViewportRectangle &rect)
Definition MRViewport.h:32
T getAt(const Buffer< T, I > &bmap, I key)
given some buffer map and a key, returns the value associated with the key, or default value if key i...
Definition MRBuffer.h:119
SetBitIteratorT< BitSet >(FaceSetBitIterator, SetBitIteratorT< FaceBitSet >)(VertSetBitIterator
phmap::flat_hash_map< K, V, Hash, Eq > HashMap
Definition MRMesh/MRMeshFwd.h:450
flat map: I -> T
Definition MRBuffer.h:143
Buffer< T, I > b
Definition MRBuffer.h:144
size_t tsize
target size, all values inside b must be less than this value
Definition MRBuffer.h:145