Skip to content

@graphty/graphty-element / catalog / BuiltInAlgorithmDescriptor

Interface: BuiltInAlgorithmDescriptor ​

Defined in: graphty-element/src/catalog/algorithms.ts:112

A built-in algorithm descriptor: the published descriptor, plus the 1.10 keys that folded into it.

key is narrowed to KnownAlgorithm rather than left as the open AlgorithmKey, so a built-in whose key is not in the published list fails to compile here instead of appearing in a catalogue nothing else knows about.

Extends ​

Properties ​

approximable? ​

optional approximable?: object

Defined in: graphty-element/src/catalog/types.ts:701

defaultSample ​

defaultSample: number

method ​

method: string

plainName ​

plainName: string

seeded ​

seeded: boolean

Inherited from ​

AlgorithmDescriptor.approximable


category ​

category: string & object | "community" | "path" | "centrality" | "flow" | "structure" | "prediction"

Defined in: graphty-element/src/catalog/types.ts:685

Inherited from ​

AlgorithmDescriptor.category


complexity ​

complexity: string

Defined in: graphty-element/src/catalog/types.ts:690

Inherited from ​

AlgorithmDescriptor.complexity


cost? ​

optional cost?: (n, m) => number

Defined in: graphty-element/src/catalog/types.ts:700

A cost model in seconds over a graph of n nodes and m edges.

SUPERSEDED BY RegisteredAlgorithm.cost, and not to be set by a plugin. A function is not plain JSON, so a descriptor carrying one stops surviving JSON.stringify and a postMessage -- which is why no built-in sets it and a test pins that. Declare static cost on the algorithm class instead, where the registry holds it beside the class reference and a function belongs.

Parameters ​

n ​

number

m ​

number

Returns ​

number

Inherited from ​

AlgorithmDescriptor.cost


costClass ​

costClass: "instant" | "iterative" | "heavy" | "cubic" | "unbounded"

Defined in: graphty-element/src/catalog/types.ts:689

Inherited from ​

AlgorithmDescriptor.costClass


description ​

description: string

Defined in: graphty-element/src/catalog/types.ts:684

Inherited from ​

AlgorithmDescriptor.description


fields ​

fields: readonly FieldDescriptor[]

Defined in: graphty-element/src/catalog/types.ts:687

Inherited from ​

AlgorithmDescriptor.fields


key ​

readonly key: "degree" | "betweenness" | "closeness" | "pagerank" | "eigenvector" | "katz" | "hits" | "louvain" | "leiden" | "label-propagation" | "components" | "shortest-path" | "all-pairs-distance" | "all-paths" | "max-flow" | "min-cut" | "k-core" | "clustering-coefficient" | "girvan-newman" | "bfs" | "dfs" | "kruskal" | "prim" | "bipartite-matching" | "link-prediction" | "markov-clustering" | "spectral-clustering" | "hierarchical-clustering" | "astar" | "edge-betweenness"

Defined in: graphty-element/src/catalog/algorithms.ts:113

Overrides ​

AlgorithmDescriptor.key


legacyKeys ​

readonly legacyKeys: readonly LegacyAlgorithmKey[]

Defined in: graphty-element/src/catalog/algorithms.ts:115

Every 1.10 key this descriptor replaces. One entry for all but the two folded keys.


options ​

options: readonly OptionDescriptor[]

Defined in: graphty-element/src/catalog/types.ts:688

Inherited from ​

AlgorithmDescriptor.options


plainName ​

plainName: string

Defined in: graphty-element/src/catalog/types.ts:682

Inherited from ​

AlgorithmDescriptor.plainName


requires? ​

optional requires?: object

Defined in: graphty-element/src/catalog/types.ts:707

accelerator? ​

optional accelerator?: boolean

connected? ​

optional connected?: boolean

directed? ​

optional directed?: boolean

weighted? ​

optional weighted?: boolean

Inherited from ​

AlgorithmDescriptor.requires


scopeInput? ​

optional scopeInput?: "none" | "subgraph"

Defined in: graphty-element/src/catalog/types.ts:725

What a run over a scope computes on. "subgraph": the scope's own nodes and edges, so a small scope is estimated and run as small. "none": the whole graph, keeping only the scope's values, so the run is estimated -- and refused -- as a whole-graph run.

DERIVED, NOT AUTHORED: Algorithm.register fills it from the class's static scopeInput, which is the one declaration the run, its caveat and this field all read. A plugin leaves it out of the descriptor it writes; one that disagrees with the class is refused.

OPEN UNION: values may be added in a minor release ("mask" is reserved); treat an unknown value as "none".

Inherited from ​

AlgorithmDescriptor.scopeInput


shape ​

shape: "node-metric" | "edge-metric" | "community" | "layered-grouping" | "category-table" | "path" | "node-set" | "edge-set" | "pair-list" | "temporal" | "fact"

Defined in: graphty-element/src/catalog/types.ts:686

Inherited from ​

AlgorithmDescriptor.shape


technicalName ​

technicalName: string

Defined in: graphty-element/src/catalog/types.ts:683

Inherited from ​

AlgorithmDescriptor.technicalName