Skip to content

@graphty/algorithms / index / PrimOptions

Interface: PrimOptions ​

Defined in: indexed/mst.ts:74

Options of the index-based Prim.

Extends ​

Properties ​

forest? ​

readonly optional forest?: boolean

Defined in: indexed/mst.ts:81

Grow a tree in every component, rooted at start and then at each component's lowest node index, instead of throwing on a disconnected graph. Default false, as legacy primMST.


start? ​

readonly optional start?: NodeRef

Defined in: indexed/mst.ts:76

The node the (first) tree grows from: its index, or { id }; default 0.


weights? ​

readonly optional weights?: NumericVector

Defined in: indexed/mst.ts:17

Per-arc weight override, arcCount long; gathered back to per-edge through edgeToArc.

Inherited from ​

MstOptions.weights