Boost logo

Boost :

Subject: Re: [boost] [graph] dijkstra pull request ping
From: alex (alexhighviz_at_[hidden])
Date: 2015-10-21 17:55:01


> -----Original Message-----
> From: Boost [mailto:boost-bounces_at_[hidden]] On Behalf Of Marcin
> Zalewski
> Sent: 21 October 2015 21:16
> To: boost_at_[hidden]
> Subject: Re: [boost] [graph] dijkstra pull request ping
>
> > Now, I know that in the classical usage 'decreased' is always true, so
> > there is no change in behaviour. I also know that the way that Boost
> > implements Dijkstra, it evaluates 'decreased' anyway despite knowing
> > beforehand it must be true. So you are not proposing to change
> > behaviour or to make the function less efficient. But, I think BGL
> > shouldn't evaluate 'decreased' to begin with
> > (https://svn.boost.org/trac/boost/ticket/7387).
> >
>
> The edge has to be relaxed, so we get decreased for free anyway, right?

The edge has to be relaxed, but the current boost code still applies a
comparison to see that it is relaxed, which is wasteful (that is ticket
7387),

> What do you mean by not evaluating decreased? Then we use decreased to
> check which visitor function we should call, so I am not sure if one could
get rid
> of that without having two versions of the code (one for the "classical"
version,
> and one for an arbitrary distance map).
>

Sorry I am not clear. Yes, I do think that you should get rid of the
redundant check. And, yes that would mean that if you want the arbitrary
distance map, you should have two versions.

>
>>Snip complicated stuff
>
>
> This sounds a bit complicated overall.
>

Yes it is. I think it would be better to have two versions.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk