Graph.is_dag
Check if the graph is a Directed Acyclic Graph
Usage
is_dag()
Returns:
Boolean
True if the graph is a directed acyclic graph
Example
from jellybeans.structures import Graphg = Graph()g.add_vertex(1)g.add_vertex(5)g.add_vertex(9)g.add_bidirected_edge(1, 5, (20, 30))g.add_edge(5, 9, 12)print(g.is_dag()) # False