Skip to content

ele.outdegree(includeLoops?)

eles.outdegree — Collection > Algorithms > Structural measures. Cytoscape.js signatures, parameters and return contract.

eles.outdegree — Collection › Algorithms › Structural measures

Preview · Collection › Algorithms › Structural measures

Read in the complete API reference · All API members

// The first element's out-degree, in O(1)
ele.outdegree(includeLoops?: boolean): number | undefined

The first element's out-degree, in O(1). Singular, like degree().

Parameters
NameDescription
includeLoops: boolean?Default: true

whether self-loops count

Returns number | undefined

the out-degree, or undefined when not a live node

Example

console.log(eles.outdegree()); // 1

Example graph and handle setup