Improved efficiency of edge-count for graphs in general (from (length (graph-edges...
[cl-graph.git] / dev / graph.lisp
index a8f782b..b2c1cf3 100644 (file)
@@ -1065,7 +1065,7 @@ nil gathers the entire closure(s)."
 ;;; ---------------------------------------------------------------------------
 
 (defmethod edge-count ((graph basic-graph))
-  (length (edges graph)))
+  (count-using #'iterate-edges nil graph))
 
 ;;; ---------------------------------------------------------------------------