Skip to content

eles.minDegree(includeLoops?)

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

eles.minDegree — Collection › Algorithms › Structural measures

Preview · Collection › Algorithms › Structural measures

Read in the complete API reference · All API members

// The smallest total degree among the collection's nodes
eles.minDegree(includeLoops?: boolean): number | undefined

The smallest total degree among the collection's nodes.

Parameters
NameDescription
includeLoops: boolean?Default: true

whether self-loops count

Returns number | undefined

the minimum degree, or undefined when there are no nodes

Example

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

Example graph and handle setup