This method computes the girth (the smallest n such that G contains an ncycle) of any graph. If the graph has no ncycle as a subgraph, the output will be infinity.


The object girth is a method function.