-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #211 from HicServices/feature/mathnot
Remove MathNet.Numerics, embed the one class we actually used from it
- Loading branch information
Showing
12 changed files
with
505 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
SynthEHR.Core/Statistics/Distributions/IContinuousDistribution.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// <copyright file="IContinuousDistribution.cs" company="Math.NET"> | ||
// Math.NET Numerics, part of the Math.NET Project | ||
// http://numerics.mathdotnet.com | ||
// http://github.com/mathnet/mathnet-numerics | ||
// | ||
// Copyright (c) 2009-2014 Math.NET | ||
// | ||
// Permission is hereby granted, free of charge, to any person | ||
// obtaining a copy of this software and associated documentation | ||
// files (the "Software"), to deal in the Software without | ||
// restriction, including without limitation the rights to use, | ||
// copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the | ||
// Software is furnished to do so, subject to the following | ||
// conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be | ||
// included in all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
// OTHER DEALINGS IN THE SOFTWARE. | ||
// </copyright> | ||
|
||
namespace SynthEHR.Statistics.Distributions; | ||
|
||
/// <summary> | ||
/// Continuous Univariate Probability Distribution. | ||
/// </summary> | ||
internal interface IContinuousDistribution : IUnivariateDistribution | ||
{ | ||
/// <summary> | ||
/// Gets the mode of the distribution. | ||
/// </summary> | ||
double Mode { get; } | ||
|
||
/// <summary> | ||
/// Gets the smallest element in the domain of the distribution which can be represented by a double. | ||
/// </summary> | ||
double Minimum { get; } | ||
|
||
/// <summary> | ||
/// Gets the largest element in the domain of the distribution which can be represented by a double. | ||
/// </summary> | ||
double Maximum { get; } | ||
|
||
/// <summary> | ||
/// Draws a random sample from the distribution. | ||
/// </summary> | ||
/// <returns>a sample from the distribution.</returns> | ||
double Sample(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// <copyright file="IUnivariateDistribution.cs" company="Math.NET"> | ||
// Math.NET Numerics, part of the Math.NET Project | ||
// http://numerics.mathdotnet.com | ||
// http://github.com/mathnet/mathnet-numerics | ||
// | ||
// Copyright (c) 2009-2013 Math.NET | ||
// | ||
// Permission is hereby granted, free of charge, to any person | ||
// obtaining a copy of this software and associated documentation | ||
// files (the "Software"), to deal in the Software without | ||
// restriction, including without limitation the rights to use, | ||
// copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the | ||
// Software is furnished to do so, subject to the following | ||
// conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be | ||
// included in all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
// OTHER DEALINGS IN THE SOFTWARE. | ||
// </copyright> | ||
|
||
namespace SynthEHR.Statistics.Distributions; | ||
|
||
/// <summary> | ||
/// Probability Distribution. | ||
/// </summary> | ||
internal interface IDistribution | ||
{ | ||
/// <summary> | ||
/// Gets or sets the random number generator which is used to draw random samples. | ||
/// </summary> | ||
System.Random RandomSource { get; set; } | ||
} |
66 changes: 66 additions & 0 deletions
66
SynthEHR.Core/Statistics/Distributions/IUnivariateDistribution.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// <copyright file="IUnivariateDistribution.cs" company="Math.NET"> | ||
// Math.NET Numerics, part of the Math.NET Project | ||
// http://numerics.mathdotnet.com | ||
// http://github.com/mathnet/mathnet-numerics | ||
// | ||
// Copyright (c) 2009-2013 Math.NET | ||
// | ||
// Permission is hereby granted, free of charge, to any person | ||
// obtaining a copy of this software and associated documentation | ||
// files (the "Software"), to deal in the Software without | ||
// restriction, including without limitation the rights to use, | ||
// copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the | ||
// Software is furnished to do so, subject to the following | ||
// conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be | ||
// included in all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
// OTHER DEALINGS IN THE SOFTWARE. | ||
// </copyright> | ||
|
||
namespace SynthEHR.Statistics.Distributions; | ||
|
||
/// <summary> | ||
/// Univariate Probability Distribution. | ||
/// </summary> | ||
internal interface IUnivariateDistribution:IDistribution | ||
{ | ||
/// <summary> | ||
/// Gets the mean of the distribution. | ||
/// </summary> | ||
double Mean { get; } | ||
|
||
/// <summary> | ||
/// Gets the variance of the distribution. | ||
/// </summary> | ||
double Variance { get; } | ||
|
||
/// <summary> | ||
/// Gets the standard deviation of the distribution. | ||
/// </summary> | ||
double StdDev { get; } | ||
|
||
/// <summary> | ||
/// Gets the entropy of the distribution. | ||
/// </summary> | ||
double Entropy { get; } | ||
|
||
/// <summary> | ||
/// Gets the skewness of the distribution. | ||
/// </summary> | ||
double Skewness { get; } | ||
|
||
/// <summary> | ||
/// Gets the median of the distribution. | ||
/// </summary> | ||
double Median { get; } | ||
} |
Oops, something went wrong.