Skip to content

@graphty/algorithms / index / AlgorithmEntry

Interface: AlgorithmEntry ​

Defined in: catalog.ts:172

One algorithm of the catalog.

Properties ​

accelerator ​

readonly accelerator: AcceleratorMethod | null

Defined in: catalog.ts:196

The AlgorithmAccelerator method that can take this algorithm over, or null when it always runs on the CPU. None of the algorithms needs an accelerator: each has a CPU implementation.


category ​

readonly category: AlgorithmCategory

Defined in: catalog.ts:177


direction ​

readonly direction: GraphDirection

Defined in: catalog.ts:178


dispatch ​

readonly dispatch: DispatcherMethod | null

Defined in: catalog.ts:191

The accelerated(acc) method that runs this algorithm, on an accelerator when it can; null when there is none.


fn ​

readonly fn: (...args) => unknown

Defined in: catalog.ts:176

The function, called as fn(graph, ...inputs, options).

Parameters ​

args ​

...never[]

Returns ​

unknown


inputs ​

readonly inputs: readonly AlgorithmInput[]

Defined in: catalog.ts:181

The positional arguments between the graph and the options, in order.


name ​

readonly name: string

Defined in: catalog.ts:174

The export name, and the key of this entry in ALGORITHMS.


requiredOptions ​

readonly requiredOptions: readonly string[]

Defined in: catalog.ts:183

Options that have no default and must be given.


result ​

readonly result: AlgorithmResultKind

Defined in: catalog.ts:184


values ​

readonly values: readonly string[]

Defined in: catalog.ts:189

The result's per-element arrays (one entry per node, or per edge for edge results), as property paths ("scores", "components.labels"); "" names the return value itself. Empty when there are none.


weights ​

readonly weights: WeightUse

Defined in: catalog.ts:179