From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c7fc42d2c6a0eedc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-04-04 00:28:15 PST Date: Fri, 04 Apr 2003 10:27:46 +0200 From: =?UTF-8?B?Um9kcmlnbyBHYXJjw61h?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada2005 random References: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: lglpc31.epfl.ch Message-ID: <3e8d421a$1@epflnews.epfl.ch> X-Trace: epflnews.epfl.ch 1049444890 128.178.76.8 (4 Apr 2003 10:28:10 +0200) Organization: EPFL Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.stueberl.de!news.imp.ch!news.imp.ch!news-zh.switch.ch!epflnews.epfl.ch!not-for-mail Xref: archiver1.google.com comp.lang.ada:35917 Date: 2003-04-04T10:27:46+02:00 List-Id: Peter Hermann wrote: > David C. Hoos, Sr. wrote: > >>Such an approach is statistically dubious, since the same generator is >>being used for all draws. Normally, one would use a distinct >>generator for each sequence. > > > agreed: this is of course not a purist's approach > although I could live with it in the practice. > Using Lutz Do's code (thank you) should do the job. > Do you have a better idea how to pick out randomly from a set with > an always changing number of members? > Pick a random number from Integer and do a "mod" operation. Rodrigo