Boost logo

Boost Users :

Subject: Re: [Boost-users] run time error for min_max_paths.cpp of Graph Library 1.46.1 on Fedora 12
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2011-04-13 22:29:28

On Wed, 13 Apr 2011, albert kao wrote:

> I compiled the min_max_paths.cpp in the example directory of BGL 1.46.1 on Fedora 12.
> $ g++ -I ~/boost_1_46_1 min_max_paths.cpp -o min_max_paths \
>    -L ~/boost_1_46_1_build/boost/bin.v2/libs/graph/build/gcc-4.4.4/release/link-static/threading-multi/   -lboost_graph
> Please help to solve the following run time error.
> $ min_max_paths
> terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::negative_edge> >'        
>   what():  The graph may not contain an edge with negative weight.                                                            
> Aborted (core dumped)                                                                                                         

The example appears to be incorrect; I am not sure what it is trying to
do, since it is using > and max as the comparison objects for Dijkstra's
algorithm with positive edge weights (which is equivalent to all of the
weights being negative in the normal algorithm).

-- Jeremiah Willcock

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at