You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the iterators used for adjacentVertices and adjacentUnvisitedVertices in Graph.py, when the iterator resumes after yielding a value while stepping through the animation, the iterator's local variables aren't redisplayed when the iterator resumes after the caller asks for the next value. Ideally, the call stack would be restored, the yield statement highlighted, the local variables restored simultaneously without waiting for the user to advance to the next statement after the yield. I'm not sure if that's possible with the stepping mechanism which decides where to pause based on when the highlighted lines on the call stack change. Somehow it would have to allow performng the resumeCallEnvironment() call after restoring all the call stack highlights. I have a recollection, however, that I found a way around that problem when doing the iterators on TowerOfHanoi.py.
The text was updated successfully, but these errors were encountered:
Separate issue that might be resolvable: the local variable named pathin the minimumSpanningTree method is not shown. The depthFirst method yields its internal stack as the value that is bound to path, but the stack is hidden when the iterator yields. The path is shown by highlighting some edges, but it would be nice to keep the stack visible (labeled as "path") to show how those edges were communicated to the caller. There ought to be a way to exempt some display items from being hidden when iterators yield values (and keep them visible or restore their visibility when the iterator resumes).
In the iterators used for
adjacentVertices
andadjacentUnvisitedVertices
in Graph.py, when the iterator resumes after yielding a value while stepping through the animation, the iterator's local variables aren't redisplayed when the iterator resumes after the caller asks for the next value. Ideally, the call stack would be restored, the yield statement highlighted, the local variables restored simultaneously without waiting for the user to advance to the next statement after the yield. I'm not sure if that's possible with the stepping mechanism which decides where to pause based on when the highlighted lines on the call stack change. Somehow it would have to allow performng theresumeCallEnvironment()
call after restoring all the call stack highlights. I have a recollection, however, that I found a way around that problem when doing the iterators on TowerOfHanoi.py.The text was updated successfully, but these errors were encountered: