@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? ​
optionalapproximable?: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 ​
complexity ​
complexity:
string
Defined in: graphty-element/src/catalog/types.ts:690
Inherited from ​
AlgorithmDescriptor.complexity
cost? ​
optionalcost?: (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 ​
costClass ​
costClass:
"instant"|"iterative"|"heavy"|"cubic"|"unbounded"
Defined in: graphty-element/src/catalog/types.ts:689
Inherited from ​
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 ​
key ​
readonlykey:"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 ​
legacyKeys ​
readonlylegacyKeys: readonlyLegacyAlgorithmKey[]
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 ​
plainName ​
plainName:
string
Defined in: graphty-element/src/catalog/types.ts:682
Inherited from ​
requires? ​
optionalrequires?:object
Defined in: graphty-element/src/catalog/types.ts:707
accelerator? ​
optionalaccelerator?:boolean
connected? ​
optionalconnected?:boolean
directed? ​
optionaldirected?:boolean
weighted? ​
optionalweighted?:boolean
Inherited from ​
scopeInput? ​
optionalscopeInput?:"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 ​
technicalName ​
technicalName:
string
Defined in: graphty-element/src/catalog/types.ts:683