[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: suggestion/request for random sampling from a List (Collection)
From: |
Sven Thommesen |
Subject: |
Re: suggestion/request for random sampling from a List (Collection) |
Date: |
Tue, 02 Sep 1997 10:41:56 -0500 |
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.
==================================
- Re: suggestion/request for random sampling from a List (Collection),
Sven Thommesen <=