MeshLib
 
Loading...
Searching...
No Matches
MRBitSet.h File Reference
#include "MRMeshFwd.h"

Go to the source code of this file.

Functions

MR_EXTERN_C_BEGIN MRMESHC_API MRBitSetmrBitSetNew (size_t numBits, bool fillValue)
 creates bitset of given size filled with given value
 
MRMESHC_API const uint64_t * mrBitSetBlocks (const MRBitSet *bs)
 gets read-only access to the underlying blocks of a bitset
 
MRMESHC_API size_t mrBitSetBlocksNum (const MRBitSet *bs)
 gets count of the underlying blocks of a bitset
 
MRMESHC_API size_t mrBitSetSize (const MRBitSet *bs)
 gets total length of a bitset
 
MRMESHC_API size_t mrBitSetCount (const MRBitSet *bs)
 returns the number of bits in this bitset that are set
 
MRMESHC_API bool mrBitSetEq (const MRBitSet *a, const MRBitSet *b)
 checks if two bitsets are equal (have the same length and identical bit values)
 
MRMESHC_API bool mrBitSetTest (const MRBitSet *bs, size_t index)
 returns the value of the specified bit
 
MRMESHC_API void mrBitSetSet (MRBitSet *bs, size_t index, bool value)
 sets the value of the specified bit
 
MRMESHC_API size_t mrBitSetNpos (void)
 returns special value representing the non-existent index
 
MRMESHC_API size_t mrBitSetFindFirst (const MRBitSet *bs)
 return the lowest index i such as bit i is set, or npos if *this has no on bits.
 
MRMESHC_API size_t mrBitSetFindLast (const MRBitSet *bs)
 return the highest index i such as bit i is set, or npos if *this has no on bits.
 
MRMESHC_API void mrBitSetResize (MRBitSet *bs, size_t size, bool value)
 resizes the bitset
 
MRMESHC_API void mrBitSetAutoResizeSet (MRBitSet *bs, size_t pos, bool value)
 sets element pos to given value, adjusting the size of the set to include new element if necessary
 
MRMESHC_API MRBitSetmrBitSetSub (const MRBitSet *a, const MRBitSet *b)
 creates a new bitset including a's bits and excluding b's bits
 
MRMESHC_API void mrBitSetFree (MRBitSet *bs)
 deallocates a BitSet object
 
MRMESHC_API MREdgeBitSetmrEdgeBitSetNew (size_t numBits, bool fillValue)
 creates a new EdgeBitSet object
 
MRMESHC_API MREdgeBitSetmrEdgeBitSetCopy (const MREdgeBitSet *ebs)
 creates a copy of a EdgeBitSet object
 
MRMESHC_API void mrEdgeBitSetFree (MREdgeBitSet *ebs)
 deallocates a EdgeBitSet object
 
MRMESHC_API MRUndirectedEdgeBitSetmrUndirectedEdgeBitSetNew (size_t numBits, bool fillValue)
 creates a new UndirectedEdgeBitSet object
 
MRMESHC_API MRUndirectedEdgeBitSetmrUndirectedEdgeBitSetCopy (const MRUndirectedEdgeBitSet *uebs)
 creates a copy of a UndirectedEdgeBitSet object
 
MRMESHC_API void mrUndirectedEdgeBitSetFree (MRUndirectedEdgeBitSet *uebs)
 deallocates a UndirectedEdgeBitSet object
 
MRMESHC_API MRFaceBitSetmrFaceBitSetNew (size_t numBits, bool fillValue)
 creates a new FaceBitSet object
 
MRMESHC_API MRFaceBitSetmrFaceBitSetCopy (const MRFaceBitSet *fbs)
 creates a copy of a FaceBitSet object
 
MRMESHC_API void mrFaceBitSetFree (MRFaceBitSet *fbs)
 deallocates a FaceBitSet object
 
MRMESHC_API MRVertBitSetmrVertBitSetNew (size_t numBits, bool fillValue)
 creates a new VertBitSet object
 
MRMESHC_API MRVertBitSetmrVertBitSetCopy (const MRVertBitSet *vbs)
 creates a copy of a VertBitSet object
 
MRMESHC_API void mrVertBitSetFree (MRVertBitSet *vbs)
 deallocates a VertBitSet object
 

Function Documentation

◆ mrBitSetAutoResizeSet()

MRMESHC_API void mrBitSetAutoResizeSet ( MRBitSet * bs,
size_t pos,
bool value )

sets element pos to given value, adjusting the size of the set to include new element if necessary

◆ mrBitSetBlocks()

MRMESHC_API const uint64_t * mrBitSetBlocks ( const MRBitSet * bs)

gets read-only access to the underlying blocks of a bitset

◆ mrBitSetBlocksNum()

MRMESHC_API size_t mrBitSetBlocksNum ( const MRBitSet * bs)

gets count of the underlying blocks of a bitset

◆ mrBitSetCount()

MRMESHC_API size_t mrBitSetCount ( const MRBitSet * bs)

returns the number of bits in this bitset that are set

◆ mrBitSetEq()

MRMESHC_API bool mrBitSetEq ( const MRBitSet * a,
const MRBitSet * b )

checks if two bitsets are equal (have the same length and identical bit values)

◆ mrBitSetFindFirst()

MRMESHC_API size_t mrBitSetFindFirst ( const MRBitSet * bs)

return the lowest index i such as bit i is set, or npos if *this has no on bits.

◆ mrBitSetFindLast()

MRMESHC_API size_t mrBitSetFindLast ( const MRBitSet * bs)

return the highest index i such as bit i is set, or npos if *this has no on bits.

◆ mrBitSetFree()

MRMESHC_API void mrBitSetFree ( MRBitSet * bs)

deallocates a BitSet object

◆ mrBitSetNew()

MR_EXTERN_C_BEGIN MRMESHC_API MRBitSet * mrBitSetNew ( size_t numBits,
bool fillValue )

creates bitset of given size filled with given value

◆ mrBitSetNpos()

MRMESHC_API size_t mrBitSetNpos ( void )

returns special value representing the non-existent index

◆ mrBitSetResize()

MRMESHC_API void mrBitSetResize ( MRBitSet * bs,
size_t size,
bool value )

resizes the bitset

◆ mrBitSetSet()

MRMESHC_API void mrBitSetSet ( MRBitSet * bs,
size_t index,
bool value )

sets the value of the specified bit

◆ mrBitSetSize()

MRMESHC_API size_t mrBitSetSize ( const MRBitSet * bs)

gets total length of a bitset

◆ mrBitSetSub()

MRMESHC_API MRBitSet * mrBitSetSub ( const MRBitSet * a,
const MRBitSet * b )

creates a new bitset including a's bits and excluding b's bits

◆ mrBitSetTest()

MRMESHC_API bool mrBitSetTest ( const MRBitSet * bs,
size_t index )

returns the value of the specified bit

◆ mrEdgeBitSetCopy()

MRMESHC_API MREdgeBitSet * mrEdgeBitSetCopy ( const MREdgeBitSet * ebs)

creates a copy of a EdgeBitSet object

◆ mrEdgeBitSetFree()

MRMESHC_API void mrEdgeBitSetFree ( MREdgeBitSet * ebs)

deallocates a EdgeBitSet object

◆ mrEdgeBitSetNew()

MRMESHC_API MREdgeBitSet * mrEdgeBitSetNew ( size_t numBits,
bool fillValue )

creates a new EdgeBitSet object

◆ mrFaceBitSetCopy()

MRMESHC_API MRFaceBitSet * mrFaceBitSetCopy ( const MRFaceBitSet * fbs)

creates a copy of a FaceBitSet object

◆ mrFaceBitSetFree()

MRMESHC_API void mrFaceBitSetFree ( MRFaceBitSet * fbs)

deallocates a FaceBitSet object

◆ mrFaceBitSetNew()

MRMESHC_API MRFaceBitSet * mrFaceBitSetNew ( size_t numBits,
bool fillValue )

creates a new FaceBitSet object

◆ mrUndirectedEdgeBitSetCopy()

MRMESHC_API MRUndirectedEdgeBitSet * mrUndirectedEdgeBitSetCopy ( const MRUndirectedEdgeBitSet * uebs)

creates a copy of a UndirectedEdgeBitSet object

◆ mrUndirectedEdgeBitSetFree()

MRMESHC_API void mrUndirectedEdgeBitSetFree ( MRUndirectedEdgeBitSet * uebs)

deallocates a UndirectedEdgeBitSet object

◆ mrUndirectedEdgeBitSetNew()

MRMESHC_API MRUndirectedEdgeBitSet * mrUndirectedEdgeBitSetNew ( size_t numBits,
bool fillValue )

creates a new UndirectedEdgeBitSet object

◆ mrVertBitSetCopy()

MRMESHC_API MRVertBitSet * mrVertBitSetCopy ( const MRVertBitSet * vbs)

creates a copy of a VertBitSet object

◆ mrVertBitSetFree()

MRMESHC_API void mrVertBitSetFree ( MRVertBitSet * vbs)

deallocates a VertBitSet object

◆ mrVertBitSetNew()

MRMESHC_API MRVertBitSet * mrVertBitSetNew ( size_t numBits,
bool fillValue )

creates a new VertBitSet object