matches/sort#
Interfaces#
SortedValues#
Defined in: matches/sort.ts:7
Values sorted within their groups: group g holds ends[g − 1] (0 for the first) up to ends[g].
Properties#
ends#
readonlyends:Uint32Array
Defined in: matches/sort.ts:12
high#
readonlyhigh:Uint32Array
Defined in: matches/sort.ts:10
items#
readonlyitems:Uint32Array
Defined in: matches/sort.ts:9
Per sorted place the item’s index.
low#
readonlylow:Uint32Array
Defined in: matches/sort.ts:11
Functions#
pairOrder()#
pairOrder(
first,second,range):Uint32Array
Defined in: matches/sort.ts:169
The order of pairs by first (each below range), then second, equal
pairs in their given order: a counting pass over first, then each run
of one first ordered by second (insertion for a short run).
Parameters#
first#
Uint32Array
second#
Uint32Array
range#
number
Returns#
Uint32Array
sortValues()#
sortValues(
group,groups,high,low):SortedValues
Defined in: matches/sort.ts:27
Sort count items by group (below groups), then by the unsigned 64-bit
key high·2^32 + low, equal keys in their given order. The items are
split by group in one counting pass; each group is then sorted least
significant digit first, the keys travelling with the items so every pass
reads in sequence; a digit that is the same for the whole group is
skipped. Digits are 16 bits wide in a group of 4,096 items or more, 8 bits
below. The three input arrays are overwritten.
Parameters#
group#
Uint32Array
groups#
number
high#
Uint32Array
low#
Uint32Array