[Boost-bugs] [Boost C++ Libraries] #5665: [patch attached] Graph ith_bandwidth not calculated according to docs.

Subject: [Boost-bugs] [Boost C++ Libraries] #5665: [patch attached] Graph ith_bandwidth not calculated according to docs.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-06-30 20:52:13


#5665: [patch attached] Graph ith_bandwidth not calculated according to docs.
---------------------------------+------------------------------------------
 Reporter: jdy@… | Owner: jewillco
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: None
  Version: Boost 1.46.1 | Severity: Problem
 Keywords: |
---------------------------------+------------------------------------------
 The docs say that the bandwidth is the max difference in indices for
 neighbors of a node. However the code only examines the difference when
 the source node index is higher then the target node index.

 Patch:
 --- boost_1_46_1/boost/graph/bandwidth.hpp 2010-07-03
 11:37:39.000000000 -0700
 +++ ./bandwidth.hpp 2011-06-30 13:33:47.000000000 -0700
 @@ -30,6 +30,8 @@
        using namespace std; // to call abs() unqualified
        if(f_i > f_j)
            b = max BOOST_PREVENT_MACRO_SUBSTITUTION (b, size_type(f_i -
 f_j));
 + else
 + b = max BOOST_PREVENT_MACRO_SUBSTITUTION (b, size_type(f_j -
 f_i));
      }
      return b;
    }

 Joel

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5665>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:06 UTC