Skip to main content

Function: fuseRanked()

fuseRanked<T>(lists, options): FusedItem<T>[]

Defined in: packages/agentos/src/cognition/rag/search/fuseRanked.ts:74

Fuses the lists. A list's items are in its own rank order, best first; an item twice in one list counts once, at its better rank. Every option is checked before anything is fused, a weight given for a place no list holds included.

Type Parameters​

T​

T

Parameters​

lists​

readonly readonly T[][]

options​

FuseRankedOptions<T>

Returns​

FusedItem<T>[]

Throws​

When k or a weight is not a finite number, zero or more, or a cap (perList, perGroup, limit) is not a whole number, zero or more, or positive infinity.

Throws​

When perGroup is given without groupOf.