MeshLib Documentation
Loading...
Searching...
No Matches
MRMeshC/MRBitSet.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
4
6
9
11MRMESHC_API MRBitSet* mrBitSetNew( size_t numBits, bool fillValue );
12
14MRMESHC_API const uint64_t* mrBitSetBlocks( const MRBitSet* bs );
15
18
20MRMESHC_API size_t mrBitSetSize( const MRBitSet* bs );
21
24
26MRMESHC_API bool mrBitSetEq( const MRBitSet* a, const MRBitSet* b );
27
29MRMESHC_API bool mrBitSetTest( const MRBitSet* bs, size_t index );
30
32MRMESHC_API void mrBitSetSet( MRBitSet* bs, size_t index, bool value );
33
36
39
42
44MRMESHC_API void mrBitSetResize( MRBitSet* bs, size_t size, bool value );
45
47MRMESHC_API void mrBitSetAutoResizeSet( MRBitSet* bs, size_t pos, bool value );
48
51
54
56MRMESHC_API MREdgeBitSet* mrEdgeBitSetNew( size_t numBits, bool fillValue );
57
60
63
66
69
72
74MRMESHC_API MRFaceBitSet* mrFaceBitSetNew( size_t numBits, bool fillValue );
75
78
81
83MRMESHC_API MRVertBitSet* mrVertBitSetNew( size_t numBits, bool fillValue );
84
87
90
MRMESHC_API size_t mrBitSetSize(const MRBitSet *bs)
gets total length of a bitset
MRMESHC_API const uint64_t * mrBitSetBlocks(const MRBitSet *bs)
gets read-only access to the underlying blocks of a bitset
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 void mrBitSetSet(MRBitSet *bs, size_t index, bool value)
sets the value of the specified bit
MRMESHC_API size_t mrBitSetBlocksNum(const MRBitSet *bs)
gets count of the underlying blocks of a bitset
MRMESHC_API size_t mrBitSetCount(const MRBitSet *bs)
returns the number of bits in this bitset that are set
MRMESHC_API void mrFaceBitSetFree(MRFaceBitSet *fbs)
deallocates a FaceBitSet object
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 MREdgeBitSet * mrEdgeBitSetNew(size_t numBits, bool fillValue)
creates a new EdgeBitSet object
MRMESHC_API MRUndirectedEdgeBitSet * mrUndirectedEdgeBitSetNew(size_t numBits, bool fillValue)
creates a new UndirectedEdgeBitSet object
MRMESHC_API MRUndirectedEdgeBitSet * mrUndirectedEdgeBitSetCopy(const MRUndirectedEdgeBitSet *uebs)
creates a copy of a UndirectedEdgeBitSet object
MRMESHC_API MRVertBitSet * mrVertBitSetNew(size_t numBits, bool fillValue)
creates a new VertBitSet object
MRMESHC_API void mrUndirectedEdgeBitSetFree(MRUndirectedEdgeBitSet *uebs)
deallocates a UndirectedEdgeBitSet object
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 void mrBitSetFree(MRBitSet *bs)
deallocates a BitSet object
MRMESHC_API MRFaceBitSet * mrFaceBitSetNew(size_t numBits, bool fillValue)
creates a new FaceBitSet object
MRMESHC_API void mrBitSetResize(MRBitSet *bs, size_t size, bool value)
resizes the bitset
MRMESHC_API bool mrBitSetTest(const MRBitSet *bs, size_t index)
returns the value of the specified bit
MRMESHC_API MRFaceBitSet * mrFaceBitSetCopy(const MRFaceBitSet *fbs)
creates a copy of a FaceBitSet object
MRMESHC_API MRBitSet * mrBitSetNew(size_t numBits, bool fillValue)
creates bitset of given size filled with given value
MR_EXTERN_C_BEGIN MRMESHC_API MRBitSet * mrBitSetCopy(const MRBitSet *bs)
creates a copy of a BitSet object
MRMESHC_API void mrVertBitSetFree(MRVertBitSet *vbs)
deallocates a VertBitSet object
MRMESHC_API MRVertBitSet * mrVertBitSetCopy(const MRVertBitSet *vbs)
creates a copy of a VertBitSet object
MRMESHC_API MRBitSet * mrBitSetSub(const MRBitSet *a, const MRBitSet *b)
creates a new bitset including a's bits and excluding b's bits
MRMESHC_API MREdgeBitSet * mrEdgeBitSetCopy(const MREdgeBitSet *ebs)
creates a copy of a EdgeBitSet object
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 mrBitSetNpos(void)
returns special value representing the non-existent index
MRMESHC_API void mrEdgeBitSetFree(MREdgeBitSet *ebs)
deallocates a EdgeBitSet object
#define MR_EXTERN_C_BEGIN
Definition MRMeshC/MRMeshFwd.h:26
struct MRVertBitSet MRVertBitSet
Definition MRMeshC/MRMeshFwd.h:38
#define MR_EXTERN_C_END
Definition MRMeshC/MRMeshFwd.h:27
struct MRUndirectedEdgeBitSet MRUndirectedEdgeBitSet
Definition MRMeshC/MRMeshFwd.h:36
struct MRFaceBitSet MRFaceBitSet
Definition MRMeshC/MRMeshFwd.h:37
#define MRMESHC_API
Definition MRMeshC/MRMeshFwd.h:19
struct MRBitSet MRBitSet
Definition MRMeshC/MRMeshFwd.h:34
struct MREdgeBitSet MREdgeBitSet
Definition MRMeshC/MRMeshFwd.h:35