Opened 13 years ago

Closed 13 years ago

#3192 closed Bugs (fixed)

sorted_erdos_renyi_iterator fails assertion for default value of "prob"

Reported by: Michael Hansen <mihansen@…> Owned by: Andrew Sutton
Milestone: Boost 1.41.0 Component: graph
Version: Boost 1.39.0 Severity: Problem
Keywords: Cc:

Description

The sorted_erdos_renyi_iterator constructor will fail an assertion in geometric_distribution.hpp when the "prob" parameter is left with its default value of 0. Changing the value of the parameter fixes the problem.

Output from a Boost test run: /usr/include/boost/random/geometric_distribution.hpp:44: boost::geometric_distribution<IntType, RealType>::geometric_distribution(const RealType&) [with IntType = unsigned int, RealType = double]: Assertion `RealType(0) < _p && _p < RealType(1)' failed.

Change History (1)

comment:1 by Andrew Sutton, 13 years ago

Milestone: Boost 1.40.0Boost 1.41.0
Resolution: fixed
Status: newclosed

Fixed in (r54769) Changed the default probability to 0.5. Since the previous default caused an assertion, a new default value should not cause problems.

Note: See TracTickets for help on using tickets.