@@ -27,10 +27,52 @@ import roaring = require('./')
27
27
* @implements {Iterable<number>}
28
28
* @author Salvatore Previti
29
29
*/
30
- export class RoaringBitmap32 implements Iterable < number > {
30
+ export class RoaringBitmap32 implements Set < number > {
31
31
// Allows: import RoaringBitmap32 from 'roaring/RoaringBitmap32'
32
32
private static readonly default : typeof RoaringBitmap32
33
33
34
+ /**
35
+ * Property: The version of the CRoaring libary as a string.
36
+ * Example: "0.4.0"
37
+ *
38
+ * @export
39
+ * @constant
40
+ * @type {string } The version of the CRoaring libary as a string. Example: "0.2.42"
41
+ */
42
+ public static readonly CRoaringVersion : string
43
+
44
+ /**
45
+ * Property: The version of the roaring npm package as a string.
46
+ * Example: "1.2.0"
47
+ *
48
+ * @export
49
+ * @constant
50
+ * @type {string } The version of the roaring npm package as a string. Example: "0.2.42"
51
+ */
52
+ public static readonly PackageVersion : string
53
+
54
+ /**
55
+ * Property: The version of the CRoaring libary as a string.
56
+ * Example: "0.4.0"
57
+ *
58
+ * @export
59
+ * @constant
60
+ * @type {string } The version of the CRoaring libary as a string. Example: "0.2.42"
61
+ * @memberof RoaringBitmap32
62
+ */
63
+ public readonly CRoaringVersion : string
64
+
65
+ /**
66
+ * Property: The version of the roaring npm package as a string.
67
+ * Example: "1.2.0"
68
+ *
69
+ * @export
70
+ * @constant
71
+ * @type {string } The version of the roaring npm package as a string. Example: "0.2.42"
72
+ * @memberof RoaringBitmap32
73
+ */
74
+ public readonly PackageVersion : string
75
+
34
76
/**
35
77
* Property. Gets the number of items in the set (cardinality).
36
78
*
@@ -336,7 +378,7 @@ export class RoaringBitmap32 implements Iterable<number> {
336
378
public static xorMany ( ...values : RoaringBitmap32 [ ] ) : RoaringBitmap32
337
379
338
380
/**
339
- * [Symbol.iterator]() Gets a new iterator able to iterate all values in the set in order.
381
+ * [Symbol.iterator]() Gets a new iterator able to iterate all values in the set in ascending order.
340
382
*
341
383
* WARNING: Is not allowed to change the bitmap while iterating.
342
384
* The iterator may throw exception if the bitmap is changed during the iteration.
@@ -347,7 +389,7 @@ export class RoaringBitmap32 implements Iterable<number> {
347
389
public [ Symbol . iterator ] ( ) : RoaringBitmap32Iterator
348
390
349
391
/**
350
- * Gets a new iterator able to iterate all values in the set in order.
392
+ * Gets a new iterator able to iterate all values in the set in ascending order.
351
393
*
352
394
* WARNING: Is not allowed to change the bitmap while iterating.
353
395
* The iterator may throw exception if the bitmap is changed during the iteration.
@@ -359,6 +401,56 @@ export class RoaringBitmap32 implements Iterable<number> {
359
401
*/
360
402
public iterator ( ) : RoaringBitmap32Iterator
361
403
404
+ /**
405
+ * Gets a new iterator able to iterate all values in the set in ascending order.
406
+ * This is just for compatibility with the Set<number> interface.
407
+ *
408
+ * WARNING: Is not allowed to change the bitmap while iterating. Undefined behaviour.
409
+ * The iterator may throw exception if the bitmap is changed during the iteration.
410
+ *
411
+ * Same as [Symbol.iterator]()
412
+ *
413
+ * @returns {RoaringBitmap32Iterator } A new iterator
414
+ * @memberof RoaringBitmap32
415
+ */
416
+ public keys ( ) : RoaringBitmap32Iterator
417
+
418
+ /**
419
+ * Gets a new iterator able to iterate all values in the set in ascending order.
420
+ * This is just for compatibility with the Set<number> interface.
421
+ *
422
+ * WARNING: Is not allowed to change the bitmap while iterating. Undefined behaviour.
423
+ * The iterator may throw exception if the bitmap is changed during the iteration.
424
+ *
425
+ * Same as [Symbol.iterator]()
426
+ *
427
+ * @returns {RoaringBitmap32Iterator } A new iterator
428
+ * @memberof RoaringBitmap32
429
+ */
430
+ public values ( ) : RoaringBitmap32Iterator
431
+
432
+ /**
433
+ * Gets a new iterator able to iterate all value pairs [value, value] in the set in ascending order.
434
+ * This is just for compatibility with the Set<number> interface.
435
+ *
436
+ * WARNING: Is not allowed to change the bitmap while iterating. Undefined behaviour.
437
+ * The iterator may throw exception if the bitmap is changed during the iteration.
438
+ *
439
+ * Same as [Symbol.iterator]()
440
+ *
441
+ * @returns {RoaringBitmap32Iterator } A new iterator
442
+ * @memberof RoaringBitmap32
443
+ */
444
+ public entries ( ) : IterableIterator < [ number , number ] >
445
+
446
+ /**
447
+ * Executes a function for each value in the set, in ascending order.
448
+ * The callback has 3 arguments, the value, the value and this (this set). This is to match the Set<number> interface.
449
+ *
450
+ * WARNING: Is not allowed to change the bitmap while iterating. Undefined behaviour.
451
+ */
452
+ public forEach ( callbackfn : ( value : number , value2 : number , set : this) => void , thisArg ?: any ) : void
453
+
362
454
/**
363
455
* Gets the minimum value in the set.
364
456
*
@@ -862,6 +954,16 @@ export class RoaringBitmap32 implements Iterable<number> {
862
954
*/
863
955
public clone ( ) : RoaringBitmap32
864
956
957
+ /**
958
+ * Returns always "RoaringBitmap32".
959
+ *
960
+ * To have a standard string representation of the content as a string, call contentToString() instead.
961
+ *
962
+ * @returns {string } "RoaringBitmap32"
963
+ * @memberof RoaringBitmap32
964
+ */
965
+ readonly [ Symbol . toStringTag ] : string
966
+
865
967
/**
866
968
* Returns always "RoaringBitmap32".
867
969
*
@@ -1047,7 +1149,7 @@ export interface RoaringBitmap32Statistics {
1047
1149
1048
1150
/**
1049
1151
* Property: The version of the CRoaring libary as a string.
1050
- * Example: "0.2.42 "
1152
+ * Example: "0.4.0 "
1051
1153
*
1052
1154
* @export
1053
1155
* @constant
@@ -1058,7 +1160,7 @@ export const CRoaringVersion: string
1058
1160
1059
1161
/**
1060
1162
* Property: The version of the roaring npm package as a string.
1061
- * Example: "0 .2.2 "
1163
+ * Example: "1 .2.0 "
1062
1164
*
1063
1165
* @export
1064
1166
* @constant
0 commit comments