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/source/frequent_items.rst
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,8 @@ Frequent Items
3
3
4
4
.. currentmodule:: datasketches
5
5
6
-
This sketch is useful for tracking approximate frequencies of items of type `<T>` with optional associated counts `(<T> item, int count)`
7
-
that are members of a multiset of such items.
6
+
This sketch is useful for tracking approximate frequencies of items (``object`` or ``string``) with optional associated
7
+
integer counts that are members of a multiset of such items.
8
8
The true frequency of an item is defined to be the sum of associated counts.
9
9
10
10
This implementation provides the following capabilities:
@@ -23,18 +23,18 @@ The maximum map size is always a power of 2, defined through the variables ``lg_
23
23
24
24
The hash map starts at a very small size (8 entries) and grows as needed up to the specified maximum map size.
25
25
26
-
Excluding external space required for the item objects, the internal memory space usage of this sketch is `18 * ``mapSize`` bytes` (assuming 8 bytes for each reference),
26
+
Excluding external space required for the item objects, the internal memory space usage of this sketch is ``18 * mapSize`` bytes (assuming 8 bytes for each reference),
27
27
plus a small constant number of additional bytes.
28
-
The internal memory space usage of this sketch will never exceed `18 * ``maxMapSize`` ` bytes, plus a small constant number of additional bytes.
28
+
The internal memory space usage of this sketch will never exceed ``18 * maxMapSize`` bytes, plus a small constant number of additional bytes.
29
29
30
30
**Maximum Capacity of the Sketch**
31
31
32
32
The ``LOAD_FACTOR`` for the hash map is internally set at :math:`75\%`, which means at any time the map capacity of ``(item, count)`` pairs is ``mapCap = 0.75 * mapSize``.
33
-
The maximum capacity of ``(item, count)`` pairs of the sketch is `maxMapCap = 0.75 * maxMapSize`.
33
+
The maximum capacity of ``(item, count)`` pairs of the sketch is ``maxMapCap = 0.75 * maxMapSize``.
34
34
35
35
**Updating the sketch with ``(item, count)`` pairs**
36
36
37
-
If the item is found in the hash map, the mapped count field (the "counter") is incremented by the incoming count; otherwise, a new counter `"(item, count) pair"` is created.
37
+
If the item is found in the hash map, the mapped count field (the "counter") is incremented by the incoming count; otherwise, a new counter ``(item, count)`` pair is created.
38
38
If the number of tracked counters reaches the maximum capacity of the hash map, the sketch decrements all of the counters (by an approximately computed median)
0 commit comments