elementSet.size

The number of elements a set lists.

Value helperSince 0.3.0

Usage

TypeScript
ElementSet.size(s: ElementSet): number

Parameters

  • sElementSet

    The element set.

    Required

Returns

The length of the set’s element list (indices, edges, cvs, pids, nodes or connections, the first present); 0 when none is present. It is the listed count, not total.

Example

TypeScript
ElementSet.size(ElementSet.edges([[0, 1], [1, 2]])) // → 2

See also