MCPcopy Create free account
hub / github.com/ddbourgin/numpy-ml / is_acyclic

Method is_acyclic

numpy_ml/utils/graphs.py:261–263  ·  view source on GitHub ↗

Check whether the graph contains cycles

(self)

Source from the content-addressed store, hash-verified

259 return ordering
260
261 def is_acyclic(self):
262 """Check whether the graph contains cycles"""
263 return self.topological_ordering() is not None
264
265
266class UndirectedGraph(Graph):

Callers 1

test_is_acyclicFunction · 0.80

Calls 1

topological_orderingMethod · 0.95

Tested by 1

test_is_acyclicFunction · 0.64