protected Int32 CountSelfLoops(IGraph oGraph) { Debug.Assert(oGraph != null); Int32 iSelfLoops = 0; foreach (IEdge oEdge in oGraph.Edges) { if (oEdge.IsSelfLoop) { iSelfLoops++; } } return (iSelfLoops); }