Friday, February 10, 2012

Colt - Random Number Generators

/*
 * see: http://acs.lbl.gov/software/colt/
 */
@Grapes(
    @Grab(group='colt', module='colt', version='1.2.0')
)
import cern.jet.random.*

println Binomial.staticNextInt(500,0.5d)
println ChiSquare.staticNextDouble(10.0d)
println Exponential.staticNextDouble(1.0d)
println ExponentialPower.staticNextDouble(1.0d)
println Normal.staticNextDouble(10.0d,1.0d)
println Poisson.staticNextInt(100.0d)
println Uniform.staticNextDoubleFromTo(1.0d,100.0d)
println VonMises.staticNextDouble(10.0d)

No comments:

Post a Comment