rustworkx.visit.DijkstraVisitor.discover_vertex#

DijkstraVisitor.discover_vertex(v, score)[source]#

This is invoked when a vertex is encountered for the first time and it’s popped from the queue. Together with the node, we report the optimal distance of the node.