public Startup(IConfiguration configuration) { Configuration = configuration; normalZigg = new Ziggurat(PDFType.Normal); laplaceZigg = new Ziggurat(PDFType.Laplace); tZigg = new Ziggurat(PDFType.T); }
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(); }); }
public float NextGaussian(float mu, float sigma) { return(Ziggurat.NextGaussian(this, mu, sigma)); }