Exemplo n.º 1
0
 public Startup(IConfiguration configuration)
 {
     Configuration = configuration;
     normalZigg    = new Ziggurat(PDFType.Normal);
     laplaceZigg   = new Ziggurat(PDFType.Laplace);
     tZigg         = new Ziggurat(PDFType.T);
 }
Exemplo n.º 2
0
        public Carlo(double expectedReturn, double standardDeviation, int time, Ziggurat ziggurat)
        {
            this.expectedReturn    = expectedReturn;
            this.standardDeviation = standardDeviation;
            this.time     = time;
            this.ziggurat = ziggurat;

            //var iops = new ParallelOptions() { MaxDegreeOfParallelism = Environment.ProcessorCount }; //if this server were to run other things this could be turned down
            Parallel.For(0, trials, element =>
            {
                GetRates();
            });
        }
Exemplo n.º 3
0
 public float NextGaussian(float mu, float sigma)
 {
     return(Ziggurat.NextGaussian(this, mu, sigma));
 }