[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Anybody has experience with Normal distriubution of javaswarm?
From: |
Paul Johnson |
Subject: |
Re: Anybody has experience with Normal distriubution of javaswarm? |
Date: |
Wed, 17 Jul 2002 16:18:06 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020606 |
Please consult the recently enhanced guidelines on how to ask for help:
http://lark.cc.ukans.edu/~pauljohn/Swarm/SwarmFaq/SwarmOnlineFaq.html#5.1
I don't understand why this one crashes and i wonder if it is caused by
something in your computer's operating system or the particular edition
of Swarm you are using. One can only speculate. It appears to me the
setting phase usage should be sufficient. Are you sure
meanGAParameterMutation and stdGAPParameterMutation are doubles?
In the manual I see;
DistImpl(Zone aZone, Object generator, double mean, double sdev)
and I think that means you could try to get all this done in the
constructor:
NormalDistImpl normDist = new
NormalDistImpl(getZone(),Globals.env.randomGenerator,
meanGAParameterMutation,stdGAParameterMutation);
This takes care of it all in one shot. I don't do a lot of Java, so my
syntax here for your Zone may not be exactly right.
I do know the Normal does work because I have a project that uses it and
my usage is this style:
NormalDist1 = new NormalDistImpl (getZone(), newRandomGenForNormal1) ;
holderfloat = NormalDist1.getSampleWithMean$withVariance (70, 100);
and it does work.
pj
Hu, Jianjun wrote:
I am using the swarm-2.1.1 java version. but now I met the following
problem.
The normal distribution of the swarm doesn't work!.
Here is my simple code:
NormalDistImpl normDist = new NormalDistImpl();
normDist.setMean$setStdDev(meanGAParameterMutation,
stdGAParameterMutation);
if ((Globals.env.uniformDblRand.getDoubleWithMin$withMax (0.0, 1.0))
< pGAParameterMutation){
double offset = normDist.getDoubleSample(); //Gaussian
mutations
pGASitDefault+= offset;
if(pGASitDefault<0) pGASitDefault = 0.0;
else if(pGASitDefault>1) pGASitDefault = 1.0;
}
compilation is ok. but
The runtime error is:
unable to find Java selector `setMean:setStdDev:' in objc:`JavaProxy'
0xa6ae0d8 java: 0xa17cf90 hash: 18063
It seems that I can't call the setMean$setStdDev function.
What's wrong?
Your help is greatly appreciated.
Jianjun Hu
--
Paul E. Johnson email: address@hidden
Dept. of Political Science http://lark.cc.ku.edu/~pauljohn
University of Kansas Office: (785) 864-9086
Lawrence, Kansas 66045 FAX: (785) 864-5700
==================================
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 and C++ model, Richard Leow, 2002/07/15
- Re: Swarm and C++ model, M Lang / S Railsback, 2002/07/15
- Re: Swarm and C++ model, Russell Standish, 2002/07/15
- Re: Swarm and C++ model, glen e. p. ropella, 2002/07/16
- Anybody has experience with Normal distriubution of javaswarm?, Hu, Jianjun, 2002/07/16
- Re: Anybody has experience with Normal distriubution of javaswarm?, Alex Lancaster, 2002/07/16
- Re: Anybody has experience with Normal distriubution of javaswarm?,
Paul Johnson <=
- RE: Anybody has experience with Normal distriubution of javaswarm? Thank Paul., Hu, Jianjun, 2002/07/17
- RE: Anybody has experience with Normal distriubution of javaswarm? Thank Paul., Hu, Jianjun, 2002/07/17