$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Doug Gregor (dgregor_at_[hidden])
Date: 2006-08-03 14:32:54
On Jul 24, 2006, at 12:26 PM, Ioannis Filippis wrote:
> Hi,
>
> I wonder whether float/double weights may cause a bug in
> brandes_betweenness_centrality. In the brandes_dijkstra_visitor, in
> the case where edge is not relaxed, there is an equality check
>
> if (d_w == combine(d_v, w_e))
>
> in order to find if there is equally-short path from v to w. If
> d_w, d_v, w_e are float/doubles, isn't there gonna be a problem
> with the "=="?
Oh, yuck. Yes, this could be a problem. The right fix is probably to
add a "equality_compare" function object parameter, that checks if
the two values are "close enough." The user might need to tweak that
value.
Doug