[core][graph] update nodes computability on topology change

CompatibilityNodes introduce a new notion of computability per node.
An uncomputed (and therefore uncomputable) CompatibilityNode blocks the computation of all its successor.

* update nodes computability on topology change (in addition to min/max depth)
* evaluate leaves computability to determine if the whole graph can be processed
This commit is contained in:
Yann Lanthony 2018-07-18 16:28:33 +02:00
parent 89dd55f43b
commit 30cd8001fd
2 changed files with 60 additions and 18 deletions

View file

@ -153,9 +153,8 @@ def test_transitive_reduction():
]
assert set(flowEdgesRes) == set(flowEdges)
depthPerNode = graph.minMaxDepthPerNode()
assert len(depthPerNode) == len(graph.nodes)
for node, (minDepth, maxDepth) in depthPerNode.items():
assert len(graph._nodesMinMaxDepths) == len(graph.nodes)
for node, (minDepth, maxDepth) in graph._nodesMinMaxDepths.items():
assert node.depth == maxDepth