ContinuousUniformDistribution( RandomSource random ) : base(random) { SetDistributionParameters(0.0, 1.0); }
ParetoDistribution( RandomSource random ) : base(random) { SetDistributionParameters(1.0, 1.0); }
ArbitraryDistribution( RandomSource random ) : base(random) { SetDistributionParameters(0, 1.0); }
BernoulliDistribution( RandomSource random ) : base(random) { SetDistributionParameters(0.5); }
/// <summary> /// Initializes a new instance, using the specified <see cref="RandomSource"/> /// as underlying random number generator. /// </summary> /// <param name="random">A <see cref="RandomSource"/> object.</param> /// <exception cref="ArgumentNullException"> /// <paramref name="random"/> is NULL (<see langword="Nothing"/> in Visual Basic). /// </exception> public BetaDistribution(RandomSource random) : base(random) { SetDistributionParameters(1.0, 1.0); _gammaAlpha = new GammaDistribution(random); _gammaBeta = new GammaDistribution(random); }
CauchyLorentzDistribution( RandomSource random ) : base(random) { SetDistributionParameters(0.0, 1.0); }
BinomialDistribution( RandomSource random ) : base(random) { SetDistributionParameters(0.5, 1); }
DiscreteUniformDistribution( RandomSource random ) : base(random) { SetDistributionParameters(0, 1); }
ErlangDistribution( RandomSource random ) : base(random) { SetDistributionParameters(1, 1.0); }
LaplaceDistribution( RandomSource random ) : base(random) { SetDistributionParameters(0.0, 1.0); }
StableDistribution( RandomSource random ) : base(random) { SetDistributionParameters(0.0, 1.0, 1.0, 0.0); InitDistributions(); }
ChiDistribution( RandomSource random ) : base(random) { _standard = new StandardDistribution(random); SetDistributionParameters(1); }
public ZipfDistribution(double skew, int seed) { if (skew <= 1d) throw new ArgumentOutOfRangeException("skew", skew, "The skew should be greater than 1.0."); this.skew = skew; random = new SystemRandomSource(seed); }
NormalDistribution( RandomSource random ) : base(random) { _standard = new StandardDistribution(random); SetDistributionParameters(0.0, 1.0); }
FisherSnedecorDistribution( RandomSource random ) : base(random) { _chiSquaredAlpha = new ChiSquareDistribution(random); _chiSquaredBeta = new ChiSquareDistribution(random); SetDistributionParameters(1, 1); }
public PetriNetScheduler() { _schedulablesWithEvent = new List<ISchedulable>(128); _deltaEvents = new List<SchedulerEventItem>(128); _timeline = new Timeline(); _schedule = new ScheduleStore(); _simulationTime = TimeSpan.Zero; _random = new SystemRandomSource(); }
StudentsTDistribution( RandomSource random ) : base(random) { _standardDistribution = new StandardDistribution(RandomSource); _chiSquareDistribution = new ChiSquareDistribution(RandomSource); SetDistributionParameters(1); }
/// <summary> /// Create a zipf distribution with the provided skew. /// </summary> public ZipfDistribution(double skew) { if(skew <= 1d) { throw new ArgumentOutOfRangeException("skew", skew, string.Format(Resources.ArgumentOutOfRangeGreater, "skew", "1.0")); } this.skew = skew; random = new SystemRandomSource(); }
/// <summary> /// Create a gaussian noise source with normally distributed amplitudes. /// </summary> /// <param name="uniformWhiteRandomSource">Uniform white random source.</param> /// <param name="mean">mu-parameter of the normal distribution</param> /// <param name="standardDeviation">sigma-parameter of the normal distribution</param> public WhiteGaussianNoiseSource( RandomSource uniformWhiteRandomSource, double mean, double standardDeviation ) { NormalDistribution gaussian = new NormalDistribution(uniformWhiteRandomSource); gaussian.SetDistributionParameters(mean, standardDeviation); _distribution = gaussian; }
DiscreteDistribution( RandomSource random ) { if(random == null) { string message = string.Format(null, Resources.ArgumentNull, "generator"); throw new ArgumentNullException("generator", message); } _random = random; }
/// <summary> /// Create a skew alpha stable noise source. /// </summary> /// <param name="uniformWhiteRandomSource">Uniform white random source.</param> /// <param name="location">mu-parameter of the stable distribution</param> /// <param name="scale">c-parameter of the stable distribution</param> /// <param name="exponent">alpha-parameter of the stable distribution</param> /// <param name="skewness">beta-parameter of the stable distribution</param> public StableNoiseSource( RandomSource uniformWhiteRandomSource, double location, double scale, double exponent, double skewness ) { StableDistribution stable = new StableDistribution(uniformWhiteRandomSource); stable.SetDistributionParameters(location, scale, exponent, skewness); _distribution = stable; }
/// <summary> /// Initializes a new instance, using the specified <see cref="RandomSource"/> /// as underlying random number generator. /// </summary> /// <param name="random">A <see cref="RandomSource"/> object.</param> /// <exception cref="ArgumentNullException"> /// <paramref name="random"/> is NULL (<see langword="Nothing"/> in Visual Basic). /// </exception> public PoissonDistribution(RandomSource random) : base(random) { SetDistributionParameters(1.0); }
ExponentialDistribution( RandomSource random ) : base(random) { SetDistributionParameters(1.0); }
TriangularDistribution( RandomSource random ) : base(random) { SetDistributionParameters(0.0, 1.0, 0.5); }
/// <summary> /// Zipfian generator with a default <c>skew</c> equal to <c>2</c>. /// </summary> public ZipfDistribution() { this.skew = 2d; random = new SystemRandomSource(); }
HypergeometricDistribution( RandomSource random ) : base(random) { SetDistributionParameters(2, 1, 1); }
/// <summary> /// Zipfian generator with a default <c>skew</c> equal to <c>2</c>. /// </summary> /// <param name="random">A <see cref="RandomSource"/> object.</param> public ZipfDistribution(RandomSource random) { this.skew = 2d; this.random = random; }
StandardDistribution( RandomSource random ) : base(random) { }
/// <summary> /// Initializes a new instance, using the specified <see cref="RandomSource"/> /// as underlying random number generator. /// </summary> /// <param name="random">A <see cref="RandomSource"/> object.</param> /// <exception cref="ArgumentNullException"> /// <paramref name="random"/> is NULL (<see langword="Nothing"/> in Visual Basic). /// </exception> public GeometricDistribution(RandomSource random) : base(random) { SetDistributionParameters(0.5); }
/// <summary> /// Initializes a new instance, using the specified <see cref="RandomSource"/> /// as underlying random number generator. /// </summary> /// <param name="random">A <see cref="RandomSource"/> object.</param> /// <exception cref="ArgumentNullException"> /// <paramref name="random"/> is NULL (<see langword="Nothing"/> in Visual Basic). /// </exception> public GammaDistribution(RandomSource random) : base(random) { SetDistributionParameters(1.0, 1.0); }