ClusterLeidenResults

ClusterLeidenResults

Wrapper around the Leiden clustering results on the Wasm heap, produced by clusterGraph.

Classes

ClusterLeidenResults

Methods

free()

Source:
Returns:

Frees the memory allocated on the Wasm heap for this object. This invalidates this object and all references to it.

membership(optionsopt) → {Int32Array|Int32WasmArray}

Source:
Parameters:
Name Type Attributes Default Description
options object <optional>
{}

Optional parameters.

Properties
Name Type Attributes Default Description
copy boolean | string <optional>
true

Whether to copy the results from the Wasm heap, see possibleCopy.

Returns:

Array containing the cluster membership for each cell.

Type
Int32Array | Int32WasmArray

modularity() → {number}

Source:
Returns:

The quality of the Leiden clustering.

Note that Leiden's quality score is technically a different measure from modularity. Nonetheless, we use modularity for consistency with the other SNN clustering result classes.

Type
number