Boost random's min < max assert
Uniform int contains an assert if min < max. If I ask for a random between 1 and 1 I'm expecting a 1, not an assert. Is there some reason this was deemed inappropriate? Thanks, Glen [Non-text portions of this message have been removed]
From: Glen Knowles [mailto:gknowles@centor.com] Subject: [Boost-Users] Boost random's min < max assert
Uniform int contains an assert if min < max. If I ask for a random between 1 and 1 I'm expecting a 1, not an assert. Is there some reason this was deemed inappropriate?
Thanks, Glen
Yeah, I think it is the open interval [min,max) which is the traditional random interval. Thus min < max, not min <= max. Matt.
Glen Knowles wrote:
Uniform int contains an assert if min < max. If I ask for a random between 1 and 1 I'm expecting a 1, not an assert. Is there some reason this was deemed inappropriate?
When I wrote that code, I never thought somebody would want to generate a constant 1 as a random number. I agree that this looks non-orthogonal on first sight. I'll look into it. Jens Maurer
participants (3)
-
Glen Knowles
-
Jens Maurer
-
Matthew Hurd