swarm-support
[Top][All Lists]
Advanced

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

Re: [Swarm-Support] How to use swarm.random.NormalDistImpl?


From: Konrad_Richter
Subject: Re: [Swarm-Support] How to use swarm.random.NormalDistImpl?
Date: Wed, 16 Feb 2005 19:46:47 +0100


Dear Yu,
I think, the following lines of code should do it:
(in header): import swarm.random.NormalDistImpl;

(in main part of code):
NormalDistImpl aRandomDist = new NormalDistImpl(getZone(), Globals.env.randomGenerator);

public double createRandomNumber(){
    double number;
    number = aRandomDist.getSampleWithMean$withVariance(0,0.05);
    return number;
}
 
Hope this helps,

greetings,
        Konrad

______________________________________ 
 
Konrad Richter
McKinsey & Company, Inc.
Herrengasse 1-3
A-1010 Wien
Austria
 
Phone +43 1 5370-6160
Fax +43 1 5370-6161
Mobile +49 175 318-6160
 



于 同奎 <address@hidden>
Sent by: address@hidden

16.02.2005 19:29

Please respond to
Swarm Support <address@hidden>

To
address@hidden
cc
Subject
[Swarm-Support] How to use swarm.random.NormalDistImpl?





I use swarm2.2 java version on windowsXp.

I want to generate a random double number following a Normal distribution
with mean 0 and deviation 0.05, how can i get it?

In the constructor of swarm.random.NormalDistImpl,what is the second
parameter?
Can anybody give me a example?

Thanks a lot!



于同奎 Tongkui Yu
----------------------------------------------
重庆大学经济与工商管理学院硕士研究生
E-mail:address@hidden
Tel:023-65108564
QQ:35651106
重庆大学12舍2单元651
个人主页:http://www.5ixx.net

Postgraduate of Management Science and Engineering
Tel:+86 02365108564
E-mail:address@hidden
Homepage:http://www.5ixx.net
College of Economics and Business Administration,
Chongqing University, 400030, P.R.China
-----------------------------------------------

_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  

_______________________________________________
Support mailing list
address@hidden
http://www.swarm.org/mailman/listinfo/support



+=========================================================+
This message may contain confidential and/or privileged
information.  If you are not the addressee or authorized to
receive this for the addressee, you must not use, copy,
disclose or take any action based on this message or any
information herein.  If you have received this message in
error, please advise the sender immediately by reply e-mail
and delete this message.  Thank you for your cooperation.
+=========================================================+






reply via email to

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