$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Michael Kettner (kettner_at_[hidden])
Date: 2006-03-01 08:54:00
Hi Marcio!
On Wednesday 29 March 2006 14:43, Marcio Paim de Aquino wrote:
> Hello all,
>
> does anyone know how to make a custom dijkstra visitor that ends the
> algorithm when
> it finds the path between two especified vertexes?
You might read the manual. This is from
http://www.boost.org/libs/graph/doc/faq.html
How do I perform an early exit from an algorithm such as BFS?
Create a visitor that throws an exception when you want to cut off the
search, then put your call to breadth_first_search inside of an appropriate
try/catch block. This strikes many programmers as a misuse of exceptions,
however, much thought was put into the decision to have exceptions has the
preferred way to exit early. See boost email discussions for more details.
Regards,
Michael
> Thanks,
>
> Marcio