algorithms

algorithms.triangleCount

triangleCount(options: CommonAlgorithmOptions & AlgorithmWriteOptions): Promise<NodeScalarResult>

Count the number of triangles each node participates in.

Dispatched to the background worker. Emits the standard algorithm lifecycle events. When writeTo is supplied counts are written to node properties (recorded in history, undoable).

optionsCommonAlgorithmOptions & AlgorithmWriteOptionsCommonAlgorithmOptions merged with AlgorithmWriteOptions.

Returns: Promise<NodeScalarResult>