Skip to content

eles.totalDegree(includeLoops?)

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

eles.totalDegree — Collection › Algorithms › Structural measures

Preview · Collection › Algorithms › Structural measures

Read in the complete API reference · All API members

// The summed degree of every node in the collection — the whole-collection figure that degree() deliberately is not
eles.totalDegree(includeLoops?: boolean): number

The summed degree of every node in the collection — the whole-collection figure that degree() deliberately is not.

Parameters
NameDescription
includeLoops: boolean?Default: true

whether self-loops count

Returns number

the total degree (0 when there are no nodes)

Example

console.log(eles.totalDegree()); // 4

Example graph and handle setup