scoreSubjects()
Scores subjects from explicit ScoreSignal facts and ranks the resulting view (D573).
Import
Section titled “Import”import { scoreSubjects } from "@graphrefly/ts/scoring";Signature
Section titled “Signature”function scoreSubjects( subjects: readonly ScoreSubject<T>[], signals: readonly ScoreSignal[], policy: ScorePolicy, opts: ScoreSubjectsOptions = {},): ScoredView<T>Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
subjects | readonly ScoreSubject<T>[] | subjects value used by the helper. |
signals | readonly ScoreSignal[] | signals value used by the helper. |
policy | ScorePolicy | Policy object used to admit, retry, or route work. |
opts | ScoreSubjectsOptions | Options that configure the helper. |
Returns
Section titled “Returns”A ScoredView<T> value.
Example
Section titled “Example”import { scoreSubjects } from "@graphrefly/ts/scoring";Source
Section titled “Source”packages/ts/src/scoring/helpers.ts