|
Boost : |
Subject: Re: [boost] [random][rational] Is there any standard way to generate a random rationals?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2015-03-05 14:24:15
AMDG
On 03/05/2015 12:12 PM, Damian Vicino wrote:
> Hi,
> Im using Boost.Rational in a simulation program.
>
> for some experiment, I want to generate some random values between 2 rational numbers.
> Im wondering if someone already worked on this.
>
I'm not aware of anything.
You could try something like:
- Find a denominator somehow
- Then calculate a random numerator
In Christ,
Steven Watanabe
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk