Boost logo

Boost :

From: Andrew Sutton (asutton_at_[hidden])
Date: 2007-06-12 20:50:50

>> dijkstra_shortest_paths throws a negative_edge exception and I _do
>> not_ have any negative edge in my graph (checked it both when I add
>> the edges and their weights to the graph and by iterating through the
>> edges once I finish constructing it).
>> Did anyone have a similar problem?
> I've never seen this before. Which version of Boost are you using,
> and what is the edge weight that it is classifying as negative?

I've been working with Boost.Graph a bit... ha ha... As Doug asks,
what version are you using? Also, how are you passing edge weights to
the algorithm? Are the weights internally properties or external
properties? If they're internal, does your graph use old-style
properties or bundled properties?

I've found that it can be easy to forget to initialize vertex and
edge properties if you're using old-style properties.

Andrew Sutton

Boost list run by bdawes at, gregod at, cpdaniel at, john at