ftp.nice.ch/pub/next/science/mathematics/Random.2.0.N.bs.tar.gz#/Random2.0/Documentation/Classes/References/Gaussian_Ref.rtf

This is Gaussian_Ref.rtf in view mode; [Download] [Up]

Version 2.0: Written by Gregor N. Purdy.
Copyright ©1991, 1992 Contemporary Design Studios. All rights reserved.



Gaussian 

INHERITS FROM	Random



CLASS DESCRIPTION

The Gaussian class provides Gaussian random variables.

This class is part of Version 2.0 of Random, distributed 1992 May 29.

Contemporary Design Studios
2339 Woodchip Way #1B
Ypsilanti, MI 48197
313-572-1779

Gregor N. Purdy
Software Designer
University of Michigan
gregor@umich.edu

WHILE THE AUTHOR DOES WORK FOR THE UNIVERSITY OF MICHIGAN, AND PROVIDES HIS EMAIL ADDRESS AT WORK, THIS PRODUCT IS IN NO WAY AFFILIATED WITH THE UNIVERSITY OF MICHIGAN. ALL THE DESIGN, CODING, TESTING, AND DOCUMENTATION IS DONE ON THE AUTHOR'S OWN TIME.

THIS WORK IS DISTRIBUTED AS IS, WITH NO WARANTEE OR GUARANTEE EXPRESSED OR IMPLIED IN ANY RESPECT. THE AUTHOR IS NOT LIABLE FOR ANY DAMAGES WHATSOEVER DIRECTLY OR INDIRECTLY RELATED TO THE USAGE OF THIS WORK.

Comments, suggestions, and bug reports are welcome. Feel free to drop us an email or letter with your comments.

This work is distributed as FreeWare. Version 1.0 was further restricted under the GNU Public License, version 1. Version 1.1 had the same restrictions as this version. 

This version of the Random Classes may be used by anyone, anywhere, for anything, with the following conditions:
(i)	The usage must not be illegal in any way.
(ii)	You must credit Contemporary Design Studios and include the copyright information at the top of this document in your documentation and in your "Info Panel," if any, if your work is ever used by anyone other than yourself.
(iii)	Contemporary Design Studios retains the right to make improvements to this work and to change the distribution conditions and terms in future versions, including commercial derivative works.
(iv)	You may NOT in any way change the Random Classes and redistribute them, even under a new name, but you MAY, and in fact are encouraged to, report bugs and make suggestions for enhancements to Contemporary Design Studios.
(iv)	You MAY make subclasses of Random that do whatever you want. Of course, these subclasses will be governed by your own rules, but the Random Classes will still be governed by these rules.
(v)	You MAY distribute the source code of the Random Classes with your work, but if you do all the documentation for the Random Classes, including this notice, must be distributed with it. Nobody should ever see the source code to the Random Classes without also seeing these documentation files, so they can use it, too.




INSTANCE VARIABLES

Declared in Gaussian	BOOL	iset;
double	gset;
double	gscale;
double	gorigin;

iset 	Flag indicating absence or presence of saved value
gset 	Saved value, if any
gscale	The scaling factor for the numbers
gorigin 	The point around which the distribution will be centered



METHOD TYPES

Creating and freeing instances	+ alloc
- free

Getting and setting parameters	- gOrigin
- gScale
- setGOrigin:
- setGScale:

Getting a Gaussian random variable	- gaussian

Archiving	- read:
- write:



CLASS METHODS


alloc
+ alloc

Returns a new uninitialized instance.


INSTANCE METHODS


free
- free

Frees the memory occupied by the Gaussian instance and returns nil.


gaussian
- (double)gaussian

Returns one random Gaussian value.


gOrigin
- (double)gOrigin

Returns the center of the Gaussian distribution.


gScale
- (double)gScale

Returns the spread of the Gaussian distribution.


read:
- read:(NXTypedStream *)stream

Unarchives a DieRoller from stream.

See also:  - write:


setGOrigin:
- setGOrigin:(double)anOrigin

Sets the center of the Gaussian distribution to anOrigin.


setGScale:
- setGOrigin:(double)aScale

Sets the spread of the Gaussian distribution to aScale.


write:
- write:(NXTypedStream *)stream

Archives a DieRoller to stream.

See also:  - read:

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.