ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
Re: [boost] Random library: fn seed returning current seed value- why not
by Matthias Troyer other posts by this author
May 19 2003 8:33PM messages near this date
[boost] Re: Random library: fn seed returning current seed value- whynot | [boost] Mac OS 10 & type_traits/type_with_alignment.hpp
Hi Csaba,

Let me try to answer this question since Jens Maurer, the author of 
boost random is often very busy, and I am a frequent user of his 
library.

On Monday, May 19, 2003, at 05:21 PM, Csaba Szepesvari wrote:
>  It would be nice to retrieve the current seed: I want to dump it so 
>  that
>  later I can reproduce the experiments I am running (that use the random
>  library).
>  Is there a bona fide reason not to return the seed (e.g. in the seed
>  function).

Some generators use not only a single seed number but a seed block of 
many numbers. Instead of returning a single seed number (which is the 
not possible), there are operators << and > > to save the state into a 
std::ostream and to restore it from a std::istream

>  The issue comes in when using seed without params (for "random"
>  initialization).

AFAIK using seed() without a parameter will not give a "random" 
initialization but the same initialization at every call.

Matthias

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Csaba Szepesvari
Csaba Szepesvari
Matthias Troyer

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved