finesse.graph.operator_graph.OperatorGraph.number_of_self_loops

OperatorGraph.number_of_self_loops

Get the number of self-loops in the graph.

This property returns the total number of self-loops in the graph. A node is considered to have a self-loop if the corresponding entry in the self_loop array of the graph is greater than 0. The total number of self-loops is the sum of these entries.

Returns
int

The total number of self-loops in the graph.