コード例 #1
0
    public void gaussian_can_be_created_directly()
    {
      var dist = new Gaussian(0, 0, 0);

      Assert.That(dist.Samples, Is.EqualTo(0));
      Assert.That(dist.Mean, Is.EqualTo(0));
      Assert.That(dist.Variance, Is.EqualTo(0));
      Assert.That(dist.Sdev, Is.EqualTo(0));
    }
コード例 #2
0
 public static Gaussian Invert(this Gaussian source)
 {
     return(new Gaussian(-source.Samples, source.Mean, -source.WeightedVariance));
 }