/// <summary> /// 種を設定する /// </summary> /// <param name="the_seed_1"></param> public void SetSeed(uint the_seed_1, uint the_seed_2) { seed_1 = the_seed_1; if (the_seed_1 == the_seed_2 && the_seed_1 == uint.MaxValue) { seed_2 = 0; } else if (the_seed_1 == the_seed_2) { seed_2 = the_seed_1 + 1; } else { seed_2 = the_seed_2; } ud1 = new UniformDistribution(seed_1); ud2 = new UniformDistribution(seed_2); }
/// <summary> /// constructor /// </summary> /// <param name="the_seed_1"></param> public CauchyDistributionPorlar(uint the_seed_1, uint the_seed_2) { seed_1 = the_seed_1; if (the_seed_1 == the_seed_2 && the_seed_1 == uint.MaxValue) { seed_2 = 0; } else if (the_seed_1 == the_seed_2) { seed_2 = the_seed_1 + 1; } else { seed_2 = the_seed_2; } ud1 = new UniformDistribution(seed_1); ud2 = new UniformDistribution(seed_2); }
/// <summary> /// constructor /// </summary> /// <param name="the_seed_1"></param> public NormalDistributionPolar(uint the_seed_1, uint the_seed_2) { seed_1 = the_seed_1; if (the_seed_1 == the_seed_2 && the_seed_1 == uint.MaxValue) { seed_2 = 0; } else if (the_seed_1 == the_seed_2) { seed_2 = the_seed_1 + 1; } else { seed_2 = the_seed_2; } ud1 = new UniformDistribution(seed_1); ud2 = new UniformDistribution(seed_2); even = true; }