Boost logo

Boost :

Subject: Re: [boost] [random] seeding with arbitrary integers
From: Robert Ramey (ramey_at_[hidden])
Date: 2009-10-21 01:26:30


Steven Watanabe wrote:
> AMDG

> explicit linear_congruential_engine(result_type s = default_seed);
> Effects: Constructs a linear_congruential_engine object. If c mod m
> is 0 and s mod m is 0, sets
> the engine’s state to 1, otherwise sets the engine’s state to s mod m.

So I might be passing two different seeds and generate the same
sequence of results? This would be the exact opposite of what I would
be trying to do and would likely result in a silent error that would
be a major bitch to find.

This isn't so much a specifice critcism of this particular
situation as I don't really understand the library or the
standard. It's more of rant against the things that seem
to trap me into spending disproportional amounts of time
on a regular basis. This idea of "silently fixing things"
seems to be quite popular and to me, is the cause of much
grief.

Robert Ramey


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk