本文整理汇总了C#中ConwayMaxwellPoisson类的典型用法代码示例。如果您正苦于以下问题:C# ConwayMaxwellPoisson类的具体用法?C# ConwayMaxwellPoisson怎么用?C# ConwayMaxwellPoisson使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ConwayMaxwellPoisson类属于命名空间,在下文中一共展示了ConwayMaxwellPoisson类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ValidateMean
public void ValidateMean(
[Values(1, 2, 10, 20, 1, 2)] int lambda,
[Values(1, 1, 1, 1, 2, 2)] int nu,
[Values(1.0, 2.0, 10.0, 20.0, 0.697774657964008, 1.12635723962342)] double mean)
{
var d = new ConwayMaxwellPoisson(lambda, nu);
AssertHelpers.AlmostEqual(mean, d.Mean, 10);
}
示例2: CanSampleSequence
public void CanSampleSequence()
{
var d = new ConwayMaxwellPoisson(1.0, 2.0);
var ied = d.Samples();
ied.Take(5).ToArray();
}
示例3: CanCreateConwayMaxwellPoisson
public void CanCreateConwayMaxwellPoisson(double lambda, double nu)
{
var d = new ConwayMaxwellPoisson(lambda, nu);
Assert.AreEqual(lambda, d.Lambda);
Assert.AreEqual(nu, d.Nu);
}
示例4: ValidateMinimum
public void ValidateMinimum()
{
var d = new ConwayMaxwellPoisson(1.0, 2.0);
Assert.AreEqual(0.0, d.Minimum);
}
示例5: ValidateProbabilityLn
public void ValidateProbabilityLn(double lambda, double nu, int x, double pln)
{
var d = new ConwayMaxwellPoisson(lambda, nu);
AssertHelpers.AlmostEqualRelative(pln, d.ProbabilityLn(x), 12);
}
示例6: SetNuFails
public void SetNuFails(double nu)
{
var d = new ConwayMaxwellPoisson(1.0, 2.0);
Assert.Throws<ArgumentOutOfRangeException>(() => d.Nu = nu);
}
示例7: ValidateSkewnessThrowsNotSupportedException
public void ValidateSkewnessThrowsNotSupportedException()
{
var d = new ConwayMaxwellPoisson(1.0, 2.0);
Assert.Throws<NotSupportedException>(() => { var s = d.Skewness; });
}
示例8: ValidateMaximum
public void ValidateMaximum()
{
var d = new ConwayMaxwellPoisson(1.0, 2.0);
var max = d.Maximum;
}
示例9: ValidateMedian
public void ValidateMedian()
{
var d = new ConwayMaxwellPoisson(1.0, 2.0);
var m = d.Median;
}
示例10: ConwayMaxwellPoissonCreateFailsWithBadParameters
public void ConwayMaxwellPoissonCreateFailsWithBadParameters(double lambda, double nu)
{
var d = new ConwayMaxwellPoisson(lambda, nu);
}
示例11: ValidateEntropy
public void ValidateEntropy()
{
var d = new ConwayMaxwellPoisson(1.0, 2.0);
var e = d.Entropy;
}
示例12: CanCreateConwayMaxwellPoisson
public void CanCreateConwayMaxwellPoisson([Values(0.1, 1.0, 2.5, 10.0, Double.PositiveInfinity)] double lambda, [Values(0.0, 2.5, Double.PositiveInfinity)] double nu)
{
var d = new ConwayMaxwellPoisson(lambda, nu);
Assert.AreEqual(lambda, d.Lambda);
Assert.AreEqual(nu, d.Nu);
}
示例13: ValidateProbabilityLn
public void ValidateProbabilityLn(
[Values(1.0, 1.0, 2.0, 2.0, 2.0, 2.0)] double lambda,
[Values(1.0, 1.0, 1.0, 1.0, 2.0, 2.0)] double nu,
[Values(1, 2, 1, 2, 1, 3)] int x,
[Values(-1.0, -1.69314718055995, -1.30685281944005, -1.30685281944005, -0.754324797564617, -2.95154937490084)] double pln)
{
var d = new ConwayMaxwellPoisson(lambda, nu);
AssertHelpers.AlmostEqual(pln, d.ProbabilityLn(x), 13);
}
示例14: ValidateProbability
public void ValidateProbability(
[Values(1.0, 1.0, 2.0, 2.0, 2.0, 2.0)] double lambda,
[Values(1.0, 1.0, 1.0, 1.0, 2.0, 2.0)] double nu,
[Values(1, 2, 1, 2, 1, 3)] int x,
[Values(0.367879441171442, 0.183939720585721, 0.270670566473225, 0.270670566473225, 0.470328074204904, 0.052258674911656)] double p)
{
var d = new ConwayMaxwellPoisson(lambda, nu);
AssertHelpers.AlmostEqual(p, d.Probability(x), 13);
}
示例15: SetNuFails
public void SetNuFails(double nu)
{
var d = new ConwayMaxwellPoisson(1.0, 2.0);
Assert.That(() => d.Nu = nu, Throws.ArgumentException);
}