ClusterMultilevelResults

ClusterMultilevelResults

Wrapper around multi-level clustering results on the Wasm heap, produced by clusterGraph.

Classes

ClusterMultilevelResults

Methods

bestLevel() → {number}

Source:
Returns:

Level with the lowest modularity.

Type
number

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
level number <optional>
<nullable>
null

The clustering level for which to obtain the cluster membership. Defaults to the best clustering level from bestLevel.

copy boolean <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(optionsopt) → {number}

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

Optional parameters.

Properties
Name Type Attributes Default Description
level number <optional>
<nullable>
null

The clustering level for which to obtain the modularity. Defaults to the best clustering level from bestLevel.

Returns:

The modularity at the specified level.

Type
number

numberOfLevels() → {number}

Source:
Returns:

Number of levels in the results.

Type
number