swarm-support
[Top][All Lists]
Advanced

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

Re: built in rv objects


From: Van Dung Ly
Subject: Re: built in rv objects
Date: Wed, 27 Jan 1999 12:11:09 +1100 (EST)

Rick,

The full description is somewhere in the ref. manual. This is what I
use .. (it's probably not the most elegant way to do things); I also went
hunting through the swarm header files.

- buildObjects
{
// snip

  id <UniformDoubleDist> udd;

  udd = [ UniformDoubleDist
          create: [self getZone]
          setGenerator: [MT19937gen create: [self getZone]
                                    setStateFromSeed: SLEEPYSEED] ];
//snip
          do
            {
              // give each cell a random color
              c = (int)([udd getDoubleWithMin: 0.0 withMax: 1.0] * 7.0);
            } while ( c == 0 );

        [aCell setColourX: c X: x Y: y];
//snip
}

Hope this helps.

============================= Life is a bridge, do not build a house on it.
         Van Dung Ly                                   
 _--_|\  Research Student
/      \ School of Computer Science and Engineering    
\_.--._* University of New South Wales                 Tel: +61 2 9385-5545
      v  Sydney 2052 Australia                         Fax: +61 2 9385-5995
         http://www.cse.unsw.edu.au/~vanly/    mailto:address@hidden
===========================================================================


On Tue, 26 Jan 1999, Rick Riolo wrote:

> 
> I was looking around the 1.3.1 ref manual for
> a description of the available built in random distribution
> generators, eg, uniformUnsRand, but I couldn't find it.
> Could someone point me to where those are described?
> thanks!
>  - r
> 
> ps also, where is the --varySeed parameter use described anywhere
>    in the manual(s)?  
> 
> Rick Riolo                           address@hidden
> Program for Study of Complex Systems (PSCS)
> 4477 Randall Lab                
> University of Michigan         Ann Arbor MI 48109-1120
> Phone: 734 763 3323                  Fax: 734 763 9267
> http://www.pscs.umich.edu/PEOPLE/rlr-home.html
> 
> 
>                   ==================================
>    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]