We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 10792b0 commit ce3fa38Copy full SHA for ce3fa38
lib/Graph.rakumod
@@ -1006,6 +1006,12 @@ class Graph
1006
return @cycles;
1007
}
1008
1009
+ #------------------------------------------------------
1010
+ #| Checks if the graph object is acyclic.
1011
+ method is-acyclic() {
1012
+ return self.find-cycle(:3min-length, max-length => Inf, :1count).elems == 0;
1013
+ }
1014
+
1015
#======================================================
1016
# Spanning tree
1017
0 commit comments