[Boost-bugs] [Boost C++ Libraries] #8491: boost::random::discrete_distribution ignores the first element

Subject: [Boost-bugs] [Boost C++ Libraries] #8491: boost::random::discrete_distribution ignores the first element
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-04-25 07:20:03


#8491: boost::random::discrete_distribution ignores the first element
-----------------------------------+----------------------------------------
 Reporter: astralstorm@… | Owner: no-maintainer
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: random
  Version: Boost 1.53.0 | Severity: Showstopper
 Keywords: |
-----------------------------------+----------------------------------------
 It seems that discrete_distribution can set the first item weight to 0,
 which should not be possible.

 Categorical distribution like this must use all supplied items - of course
 you use actual weight 0 as a marker of "can't happen", which should be
 documented.

 The attached testcase demonstrates the problem. (As well as shows another
 one that discrete_distribution can't handle negative weights properly.)

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8491>
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:12 UTC