Commit b437a7c5 authored by Lambert Patrick's avatar Lambert Patrick
Browse files

faster normalGen

parent cf11099d
......@@ -19,6 +19,7 @@ import org.openide.util.lookup.ServiceProvider;
import species.DiadromousFish.Gender;
import species.DiadromousFish.Stage;
import umontreal.iro.lecuyer.probdist.NormalDist;
import umontreal.iro.lecuyer.randvar.NormalACRGen;
import umontreal.iro.lecuyer.randvar.NormalGen;
@ServiceProvider(service = AquaNismsGroupProcess.class)
......@@ -91,7 +92,7 @@ public class Grow extends AquaNismsGroupProcess<DiadromousFish, DiadromousFishGr
*/
private double sigmaDeltaLVonBert = 0.2;
private transient NormalGen genNormal;
private transient NormalACRGen genNormal;
public static void main(String[] args) { System.out.println((new
XStream(new DomDriver())) .toXML(new Grow())); }
......@@ -100,7 +101,7 @@ public class Grow extends AquaNismsGroupProcess<DiadromousFish, DiadromousFishGr
@InitTransientParameters
public void initTransientParameters(Pilot pilot) {
super.initTransientParameters(pilot);
genNormal = new NormalGen( pilot.getRandomStream(),
genNormal = new NormalACRGen( pilot.getRandomStream(),
new NormalDist(0., 1.));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment