-
Notifications
You must be signed in to change notification settings - Fork 6
/
DynamicBitset.ts
71 lines (57 loc) · 1.36 KB
/
DynamicBitset.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import { bool, size_t } from './_types'
/**
* 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
*
* Source:
* [opencv2/flann/dynamic_bitset.h](https://github.com/opencv/opencv/tree/master/modules/core/include/opencv2/flann/dynamic_bitset.h#L150).
*
*/
export declare class DynamicBitset {
/**
* default constructor
*/
public constructor()
/**
* only constructor we use in our code
*
* @param sz the size of the bitset (in bits)
*/
public constructor(sz: size_t)
/**
* Sets all the bits to 0
*/
public clear(): void
/**
* true if the bitset is empty
*/
public empty(): bool
/**
* set all the bits to 0
*/
public reset(): void
public reset(index: size_t): void
public reset_block(index: size_t): void
/**
* resize the bitset so that it contains at least sz bits
*/
public resize(sz: size_t): void
/**
* set a bit to true
*
* @param index the index of the bit to set to 1
*/
public set(index: size_t): void
/**
* gives the number of contained bits
*/
public size(): size_t
/**
* check if a bit is set
*
* true if the bit is set
*
* @param index the index of the bit to check
*/
public test(index: size_t): bool
}