swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: suggestion/request for random sampling from a List (Collection)


From: Rick Riolo
Subject: Re: suggestion/request for random sampling from a List (Collection)
Date: Tue, 2 Sep 1997 12:53:55 -0400 (EDT)

Sven,
I like the idea of the List objects having for its default sampler
the UniformedUnsigned in simtools.
That with a method to override that when the List is created
is would be perfect.

I am in general for anything that allows a casual swarmer
(I like that phrase) to do more, easier.
As long as there is enough doc to help people then move
to the next step and start to do more for themselves.
(As a corrollary I am in favor of keeping those simple
default RNG objects in simtools.)
 - r

Rick Riolo                       address@hidden
Program for Study of Complex Systems (PSCS)
4068 Randall Lab     University of Michigan
Ann Arbor MI 48109-1120
http://pscs.physics.lsa.umich.edu/PEOPLE/rlr-home.html

On Tue, 2 Sep 1997, Sven Thommesen wrote:

> Date: Tue, 02 Sep 1997 10:41:56 -0500
> From: Sven Thommesen <address@hidden>
> To: address@hidden
> Subject: Re: suggestion/request for random sampling from a List (Collection) 
> 
> At 10:07 AM 9/2/1997 -0400, you wrote:
> >
> >I very often find myself writing codes to pick an
> >agent out of a list (and sometimes other collections) 
> >at random (ie a uniform random sample with replacement). 
> >It would be nice if List (and perhaps other collections) had 
> >a method
> >  myA = [myList getRandom];
> >To support this, one would be required to tell the list
> >what generator to use, so that it would be under the user's control
> >(in particular, so seed/sequence would be replicable).
> >
> 
> But perhaps the default should be that every list object is connected to
> the UniformUnsigned object supplied in simtools on creation; that way even
> the casual swarmer would have a List that works out-of-the-box. 
> 
> Though there has been some discussion whether we ought to supply those
> random objects in simtools at all ... Anyone have comments on that ?
> 
> -Sven Thommesen
> 
> >If there are others who would like this, perhaps it could
> >be put on some "To-Add" list for the core libs.
> >
> >thanks.
> > - r
> >
> >ps maybe I should just do this with a C macro...
> >   still, for agent based models, it seems like a 
> >   pretty common action, so it would be generally useful in the core.
> >
> >Rick Riolo                       address@hidden
> 
> 
>                   ==================================
>    Swarm-Support is for discussion of the technical details of the day
>    to day usage of Swarm.  For list administration needs (esp.
>    [un]subscribing), please send a message to <address@hidden>
>    with "help" in the body of the message.
>                   ==================================
> 

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]