Skip to content

@graphty/cytoscape-extensions / index / AlgorithmOptions

Interface: AlgorithmOptions ​

Defined in: cytoscape-extensions/src/algorithms.ts:165

Options every "graphty*" algorithm takes.

Properties ​

directed? ​

readonly optional directed?: boolean

Defined in: cytoscape-extensions/src/algorithms.ts:167

Read the edges as directed (source to target). Default false, except where an algorithm says otherwise.


field? ​

readonly optional field?: string

Defined in: cytoscape-extensions/src/algorithms.ts:174

Write each element's value (what score or cluster returns) into data(field). A method whose result has no per-element value (a path, a tree, a number, a list of predictions) throws when given it.


gpu? ​

readonly optional gpu?: GpuMode

Defined in: cytoscape-extensions/src/algorithms.ts:179

The ...Async methods only: "auto" (default) runs on the GPU when the runtime has a usable WebGPU device, "off" runs on the CPU, "require" throws instead of running on the CPU when no device is available. The synchronous methods always run on the CPU and reject "require". Any other value throws a TypeError.


weight? ​

readonly optional weight?: string | ((edge) => number)

Defined in: cytoscape-extensions/src/algorithms.ts:169

Edge data field holding the weight, or a function of the edge. Default: every edge weighs 1.