Open
Description
Hello,
it seems that the procedure never enters in the "allowTraversal" function. Thus, it loops forever in case of graphs with cycles.
I don't know very well PowerShell, however from a first insight it is weird that the $seen variable is initialized every time allowTraversal is called.
I used this patch:
$graph.getNeighbors($currentVertex).ForEach{ $nextVertex = $_ if (!$seen[$nextVertex.getKey()]) { "NOT SEEN: " + $nextVertex.getKey() $seen[$nextVertex.getKey()] = $true $vertexQueue.enqueue($nextVertex) } }
Cheers
Metadata
Metadata
Assignees
Labels
No labels