Anton Reinhard ae1345d547
Some checks failed
Test / test (push) Has been cancelled
Add formatter
2023-08-25 10:48:22 +02:00

15 lines
329 B
Julia

in(node::Node, graph::DAG) = node in graph.nodes
in(edge::Edge, graph::DAG) = edge in graph.edges
function ==(n1::Node, n2::Node, g::DAG)
if typeof(n1) != typeof(n2)
return false
end
if !(n1 in g) || !(n2 in g)
return false
end
return n1.task == n2.task && children(n1) == children(n2)
end