[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: guassian distribution generator
From: |
Manor Askenazi |
Subject: |
Re: guassian distribution generator |
Date: |
Fri, 23 Aug 96 12:26:22 MDT |
> Has anyone ported a guassian distribution generator (given some mean and
> sd) to Swarm,
Hi Rick!
Did you miss this (from a previous message I sent)?
------------------------------------------------------------------------
Also with respect to 'serious' scientific simulation (especially in the
humanities :-) we have the Gaussian object:
/************************** Gaussian *****************************/
@interface Gaussian: SwarmObject {
id uniform ;
float mean, std ;
int stored ;
float stored_result ;
}
+create: aZone withMean: (float) aMean
Std: (float) aStd
andSeed: (unsigned) aSeed ;
+create: aZone withSeed: (unsigned) aSeed ;
-initSeed: (unsigned) aSeed ;
-setMean: (float) theMean ;
-setStd: (float) theStd ;
-setUniform: aUniform ;
-getUniform ;
-(float) rFloat ;
@end
/****************************************************************/
Note that unlike the other RNGs, Guassian is a Swarmobject and also has
a very visible and straightforward way to change the seed (Nelson's original
RNG's were meant to be distributable separately from Swarm so they are not
created in the usual way, also, the way in which users change the seed is
not intuitive enough - this may be 'corrected' by the next release).
------------------------------------------------------------------------
I was expecting to release this along (with the other new stuff which I
have reported on in that email).... Also, Sven Thommesen is working on a
few additional Distributions as we speak!
Regards,
Manor.