Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

Commit

Permalink
GH-627: So much hidden information. Is this intended?
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarsouza committed Jun 5, 2017
1 parent a658ee1 commit 3dc14aa
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,28 @@ public WeibullDistribution([Positive] double shape, [Positive] double scale)

this.k = shape;
this.lambda = scale;
}

/// <summary>
/// Gets the shape parameter k.
/// </summary>
///
/// <value>The value for this distribution's shape parameter k.</value>
///
public double Shape
{
get { return k; }
}

/// <summary>
/// Gets the scale parameter λ (lambda).
/// </summary>
///
/// <value>The value for this distribution's scale parameter λ (lambda).</value>
///
public double Scale
{
get { return lambda; }
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,30 +33,14 @@ namespace Accord.Tests.Statistics
public class WeibullDistributionTest
{

private TestContext testContextInstance;

public TestContext TestContext
{
get
{
return testContextInstance;
}
set
{
testContextInstance = value;
}
}



[Test]
public void ConstructorTest()
{
WeibullDistribution n = new WeibullDistribution(0.807602, 12.5);
Assert.AreEqual(14.067993598321863, n.Mean);
Assert.AreEqual(17.552908226174811, n.StandardDeviation);
Assert.IsFalse(Double.IsNaN(n.Mean));
Assert.IsFalse(Double.IsNaN(n.Variance));
Assert.AreEqual(12.5, n.Scale);
Assert.AreEqual(0.807602, n.Shape);
}

[Test]
Expand Down

0 comments on commit 3dc14aa

Please sign in to comment.