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

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8491: boost::random::discrete_distribution ignores the first element
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-03-11 18:30:12


#8491: boost::random::discrete_distribution ignores the first element
-------------------------------+---------------------------
  Reporter: astralstorm@… | Owner: no-maintainer
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: random
   Version: Boost 1.53.0 | Severity: Showstopper
Resolution: invalid | Keywords:
-------------------------------+---------------------------
Changes (by steven_watanabe):

 * status: reopened => closed
 * resolution: => invalid

Comment:

 You're using invalid iterators in the printing loop.
 distr.probabilities() returns by value.

 After I fix that, I get:
 {{{
 Weights: 126 215 260 265 277 340 415
 Probabilities: 0.0663857 0.113277 0.136986 0.139621 0.145943 0.179136
 0.218651
 }}}

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