WithMeanVariance() public static method

public static WithMeanVariance ( double mean, double variance ) : Normal
mean double
variance double
return Normal
Esempio n. 1
0
        public void CreateNormalFromMeanAndVariance([Values(0.0, 10.0, -5.0)] double mean,
                                                    [Values(0.0, 0.1, 1.0, 10.0, 100.0, Double.PositiveInfinity)] double var)
        {
            var normal = Normal.WithMeanVariance(mean, var);

            normal.Mean.Clamp(mean).Should().Be(mean);
            normal.Variance.Clamp(var).Should().Be(var);
        }