Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
SimAquaLife
GR3D
Commits
b437a7c5
Commit
b437a7c5
authored
Apr 03, 2020
by
Lambert Patrick
Browse files
faster normalGen
parent
cf11099d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/species/Grow.java
View file @
b437a7c5
...
...
@@ -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
Normal
ACR
Gen
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
Normal
ACR
Gen
(
pilot
.
getRandomStream
(),
new
NormalDist
(
0
.,
1
.));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment