BendNetwork.count_crossings

BendNetwork.count_crossings()

Count the number of crossings (pairs of crossing edges) in the graph.

Parameters:
graphcompas.datastructures.Graph

A graph object.

Returns:
int

The number of crossings.

Notes

This algorithm assumes that the graph lies in the XY plane.