Boost logo

Geometry :

Subject: [geometry] bug in 07_b_graph_route_example.cpp
From: Andrew Hundt (athundt_at_[hidden])
Date: 2015-04-06 16:53:32


In build_route():

https://github.com/boostorg/geometry/blob/master/example/07_b_graph_route_example.cpp#L237
https://github.com/boostorg/geometry/blob/master/example/07_b_graph_route_example.cpp#L240

The ordering that is output is flipped between each add_edge_to_route call.

I believe the correct order is:

    add_edge_to_route(graph, pred, vertex2, route);
    while (pred != vertex1)
    {
        add_edge_to_route(graph, predecessors[pred], pred, route);
        pred = predecessors[pred];
    }

This still leaves duplicate points which may be a bit wasteful but at least
it doesn't seem like any steps will be backwards!

Also, I'm a little sad the github issues are gone, they are very convenient
and easy to use. Should I report this under the old svn trac issues?

Cheers!
Andrew Hundt



Geometry list run by mateusz at loskot.net