You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/config.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ Creates a new QuickSet instance with default settings (the top-k [`window`](#qui
7
7
let config = {
8
8
9
9
mode:"minsum"||"winsum",
10
-
slot:0, // top-k window off by default (0 .. 16)
10
+
slot:0, // top-k window off by default (0 .. 64)
11
11
12
12
span:512, // max expected integer range (0 .. 2^28)
13
13
clip:0, // min expected integer range (0 .. 2^28)
@@ -48,9 +48,9 @@ Threshold for integers to qualify for a top-k position.
48
48
- Lower frequency bound per integer (exclusive).
49
49
- Defaults to `1`.
50
50
51
-
###### `slot: 0 .. 16`
51
+
###### `slot: 0 .. 64`
52
52
Amount of slots to keep track of the top-k most frequent integers in a set.
53
-
- Values between `0` and `16` set the top-k `window` size.
53
+
- Values between `0` and `64` set the top-k `window` size.
54
54
- Defaults to `0`.
55
55
56
56
###### `fifo: true || false`
@@ -62,21 +62,21 @@ Whether to eject old values from the top-k window in case of ties (*first-in fir
62
62
Besides the configured options and methods, [`QuickSet`](#new-quickset-config) returns an object with two visible and one hidden backing array and some additional properties describing the internal state.
63
63
While each array can be read without issue (for instance, to execute some logic when a specific integer reaches a certain top-k position or when its frequency exceeds a certain threshold), modifying them can lead to unwanted behaviour.
64
64
- The hidden [`bits`](#setbits-uintarray) array acts as a backing array to track all integer frequencies in a set.
65
-
- The visible arrays, [`rank`](#setrank-uintarray) and [`stat`](#setstat-uintarray) provide the top-k [`window`](#slot-0--16) of most frequent integers (rank) and values (stat) present in a set.
65
+
- The visible arrays, [`rank`](#setrank-uintarray) and [`stat`](#setstat-uintarray) provide the top-k [`window`](#slot-0--64) of most frequent integers (rank) and values (stat) present in a set.
66
66
67
67
###### `set.bits: [UintArray]`
68
68
This non-enumerable property contains the backing array (Typed) that stores all integers present in the set as well as their values.
69
69
70
70
###### `set.rank: [UintArray]`
71
71
This enumerable property displays the top-k window of ranked integers (Typed).
72
-
The window size is determined from [`slot`](#slot-0--16).
72
+
The window size is determined from [`slot`](#slot-0--64).
73
73
74
74
###### `set.stat: [UintArray]`
75
75
This enumerable property displays the values associated with each ranked integer (Typed).
76
76
Same length as [`rank`](#setrank-uintarray).
77
77
78
78
###### `set.last: Uint`
79
-
A constant parameter for accessing the last item in the top-k window defined by [`slot`](#slot-0--16).
79
+
A constant parameter for accessing the last item in the top-k window defined by [`slot`](#slot-0--64).
80
80
81
81
###### `set.tmin: Uint`
82
82
A variable parameter displaying the minimum value in the top-k window, lower bounded by [`freq`](#freq-0--2--32).
@@ -661,9 +661,9 @@ let set = new QuickSet({
661
661
662
662
### Resizing
663
663
664
-
#### `.resize( 0 .. 16 )`
664
+
#### `.resize( 0 .. 64 )`
665
665
Method for resizing the top-k [`window`](#quickset-class) to a desired amount of slots.
666
-
Keeps the set [`rank`](#setrank-uintarray) and [`stat`](#setstat-uintarray) data intact and pads with zeroes when increasing the [`slot`](#slot-0--16) parameter and drops data when decreased.
666
+
Keeps the set [`rank`](#setrank-uintarray) and [`stat`](#setstat-uintarray) data intact and pads with zeroes when increasing the [`slot`](#slot-0--64) parameter and drops data when decreased.
667
667
668
668
```js
669
669
@@ -689,9 +689,9 @@ let set = new QuickSet({
689
689
690
690
### Disposal
691
691
692
-
#### `.clear( true || 0 .. 16 )`
692
+
#### `.clear( true || 0 .. 64 )`
693
693
Method for clearing the [Typed backing array](#setbits-uintarray) (`.clear(null)`) and optionally wiping the [top-k window](#quickset-class) (`.clear(true)`).
694
-
During clearing operations, the top-k window can be resized as desired between 1 and 16 slots (`.clear(1..16)`).
694
+
During clearing operations, the top-k window can be resized as desired between 1 and 64 slots (`.clear(1..64)`).
695
695
This is useful for resetting and reusing a set between runs without constructing a `new QuickSet`.
0 commit comments