Browse Source

Distributions: drop redundant xmldoc remarks. Closes #183.

pull/194/head v3.0.0-alpha7
Christoph Ruegg 13 years ago
parent
commit
776cdfe080
  1. 7
      src/Numerics/Distributions/Bernoulli.cs
  2. 14
      src/Numerics/Distributions/Beta.cs
  3. 13
      src/Numerics/Distributions/Binomial.cs
  4. 27
      src/Numerics/Distributions/Categorical.cs
  5. 11
      src/Numerics/Distributions/Cauchy.cs
  6. 13
      src/Numerics/Distributions/Chi.cs
  7. 9
      src/Numerics/Distributions/ChiSquared.cs
  8. 7
      src/Numerics/Distributions/ContinuousUniform.cs
  9. 13
      src/Numerics/Distributions/ConwayMaxwellPoisson.cs
  10. 13
      src/Numerics/Distributions/Dirichlet.cs
  11. 7
      src/Numerics/Distributions/DiscreteUniform.cs
  12. 9
      src/Numerics/Distributions/Erlang.cs
  13. 5
      src/Numerics/Distributions/Exponential.cs
  14. 11
      src/Numerics/Distributions/FisherSnedecor.cs
  15. 17
      src/Numerics/Distributions/Gamma.cs
  16. 7
      src/Numerics/Distributions/Geometric.cs
  17. 10
      src/Numerics/Distributions/Hypergeometric.cs
  18. 9
      src/Numerics/Distributions/InverseGamma.cs
  19. 11
      src/Numerics/Distributions/InverseWishart.cs
  20. 11
      src/Numerics/Distributions/Laplace.cs
  21. 11
      src/Numerics/Distributions/LogNormal.cs
  22. 13
      src/Numerics/Distributions/MatrixNormal.cs
  23. 33
      src/Numerics/Distributions/Multinomial.cs
  24. 13
      src/Numerics/Distributions/NegativeBinomial.cs
  25. 7
      src/Numerics/Distributions/Normal.cs
  26. 13
      src/Numerics/Distributions/NormalGamma.cs
  27. 13
      src/Numerics/Distributions/Pareto.cs
  28. 15
      src/Numerics/Distributions/Rayleigh.cs
  29. 5
      src/Numerics/Distributions/Stable.cs
  30. 8
      src/Numerics/Distributions/Weibull.cs
  31. 11
      src/Numerics/Distributions/Wishart.cs
  32. 17
      src/Numerics/Distributions/Zipf.cs

7
src/Numerics/Distributions/Bernoulli.cs

@ -41,11 +41,6 @@ namespace MathNet.Numerics.Distributions
/// p specifies the probability that a 1 is generated.
/// <a href="http://en.wikipedia.org/wiki/Bernoulli_distribution">Wikipedia - Bernoulli distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class Bernoulli : IDiscreteDistribution
{
System.Random _random;
@ -85,7 +80,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Checks whether the parameters of the distribution are valid.
/// Checks whether the parameters of the distribution are valid.
/// </summary>
/// <param name="p">The probability (p) of generating one. Range: 0 ≤ p ≤ 1.</param>
/// <returns><c>true</c> when the parameters are valid, <c>false</c> otherwise.</returns>

14
src/Numerics/Distributions/Beta.cs

@ -37,21 +37,17 @@ namespace MathNet.Numerics.Distributions
{
/// <summary>
/// Continuous Univariate Beta distribution.
/// For details about this distribution, see
/// For details about this distribution, see
/// <a href="http://en.wikipedia.org/wiki/Beta_distribution">Wikipedia - Beta distribution</a>.
/// </summary>
/// <remarks>
/// <para>There are a few special cases for the parameterization of the Beta distribution. When both
/// There are a few special cases for the parameterization of the Beta distribution. When both
/// shape parameters are positive infinity, the Beta distribution degenerates to a point distribution
/// at 0.5. When one of the shape parameters is positive infinity, the distribution degenerates to a point
/// distribution at the positive infinity. When both shape parameters are 0.0, the Beta distribution
/// distribution at the positive infinity. When both shape parameters are 0.0, the Beta distribution
/// degenerates to a Bernoulli distribution with parameter 0.5. When one shape parameter is 0.0, the
/// distribution degenerates to a point distribution at the non-zero shape parameter.</para>
/// <para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can get/set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
/// distribution degenerates to a point distribution at the non-zero shape parameter.
/// </remarks>
public class Beta : IContinuousDistribution
{
System.Random _random;

13
src/Numerics/Distributions/Binomial.cs

@ -37,15 +37,12 @@ namespace MathNet.Numerics.Distributions
{
/// <summary>
/// Discrete Univariate Binomial distribution.
/// For details about this distribution, see
/// For details about this distribution, see
/// <a href="http://en.wikipedia.org/wiki/Binomial_distribution">Wikipedia - Binomial distribution</a>.
/// </summary>
/// <remarks><para>The distribution is parameterized by a probability (between 0.0 and 1.0).</para>
/// <para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
/// <remarks>
/// The distribution is parameterized by a probability (between 0.0 and 1.0).
/// </remarks>
public class Binomial : IDiscreteDistribution
{
System.Random _random;
@ -90,7 +87,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Checks whether the parameters of the distribution are valid.
/// Checks whether the parameters of the distribution are valid.
/// </summary>
/// <param name="p">The success probability (p) in each trial. Range: 0 ≤ p ≤ 1.</param>
/// <param name="n">The number of trials (n). Range: n ≥ 0.</param>

27
src/Numerics/Distributions/Categorical.cs

@ -39,18 +39,15 @@ namespace MathNet.Numerics.Distributions
{
/// <summary>
/// Discrete Univariate Categorical distribution.
/// For details about this distribution, see
/// For details about this distribution, see
/// <a href="http://en.wikipedia.org/wiki/Categorical_distribution">Wikipedia - Categorical distribution</a>. This
/// distribution is sometimes called the Discrete distribution.
/// </summary>
/// <remarks><para>The distribution is parameterized by a vector of ratios: in other words, the parameter
/// <remarks>
/// The distribution is parameterized by a vector of ratios: in other words, the parameter
/// does not have to be normalized and sum to 1. The reason is that some vectors can't be exactly normalized
/// to sum to 1 in floating point representation.</para>
/// <para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
/// to sum to 1 in floating point representation.
/// </remarks>
public class Categorical : IDiscreteDistribution
{
System.Random _random;
@ -61,7 +58,7 @@ namespace MathNet.Numerics.Distributions
/// <summary>
/// Initializes a new instance of the Categorical class.
/// </summary>
/// <param name="probabilityMass">An array of nonnegative ratios: this array does not need to be normalized
/// <param name="probabilityMass">An array of nonnegative ratios: this array does not need to be normalized
/// as this is often impossible using floating point arithmetic.</param>
/// <exception cref="ArgumentException">If any of the probabilities are negative or do not sum to one.</exception>
public Categorical(double[] probabilityMass)
@ -73,7 +70,7 @@ namespace MathNet.Numerics.Distributions
/// <summary>
/// Initializes a new instance of the Categorical class.
/// </summary>
/// <param name="probabilityMass">An array of nonnegative ratios: this array does not need to be normalized
/// <param name="probabilityMass">An array of nonnegative ratios: this array does not need to be normalized
/// as this is often impossible using floating point arithmetic.</param>
/// <param name="randomSource">The random number generator which is used to draw random samples.</param>
/// <exception cref="ArgumentException">If any of the probabilities are negative or do not sum to one.</exception>
@ -84,7 +81,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Initializes a new instance of the Categorical class from a <paramref name="histogram"/>. The distribution
/// Initializes a new instance of the Categorical class from a <paramref name="histogram"/>. The distribution
/// will not be automatically updated when the histogram changes. The categorical distribution will have
/// one value for each bucket and a probability for that value proportional to the bucket count.
/// </summary>
@ -119,7 +116,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Checks whether the parameters of the distribution are valid.
/// Checks whether the parameters of the distribution are valid.
/// </summary>
/// <param name="p">An array of nonnegative ratios: this array does not need to be normalized as this is often impossible using floating point arithmetic.</param>
/// <returns>If any of the probabilities are negative returns <c>false</c>, or if the sum of parameters is 0.0; otherwise <c>true</c></returns>
@ -141,7 +138,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Checks whether the parameters of the distribution are valid.
/// Checks whether the parameters of the distribution are valid.
/// </summary>
/// <param name="cdf">An array of nonnegative ratios: this array does not need to be normalized as this is often impossible using floating point arithmetic.</param>
/// <returns>If any of the probabilities are negative returns <c>false</c>, or if the sum of parameters is 0.0; otherwise <c>true</c></returns>
@ -165,7 +162,7 @@ namespace MathNet.Numerics.Distributions
/// <summary>
/// Sets the parameters of the distribution after checking their validity.
/// </summary>
/// <param name="p">An array of nonnegative ratios: this array does not need to be normalized
/// <param name="p">An array of nonnegative ratios: this array does not need to be normalized
/// as this is often impossible using floating point arithmetic.</param>
/// <exception cref="ArgumentOutOfRangeException">When the parameters are out of range.</exception>
void SetParameters(double[] p)
@ -401,7 +398,7 @@ namespace MathNet.Numerics.Distributions
/// Computes the cumulative distribution function. This method performs no parameter checking.
/// If the probability mass was normalized, the resulting cumulative distribution is normalized as well (up to numerical errors).
/// </summary>
/// <param name="pmfUnnormalized">An array of nonnegative ratios: this array does not need to be normalized
/// <param name="pmfUnnormalized">An array of nonnegative ratios: this array does not need to be normalized
/// as this is often impossible using floating point arithmetic.</param>
/// <returns>An array representing the unnormalized cumulative distribution function.</returns>
internal static double[] ProbabilityMassToCumulativeDistribution(double[] pmfUnnormalized)

11
src/Numerics/Distributions/Cauchy.cs

@ -37,14 +37,9 @@ namespace MathNet.Numerics.Distributions
{
/// <summary>
/// Continuous Univariate Cauchy distribution.
/// The Cauchy distribution is a symmetric continuous probability distribution. For details about this distribution, see
/// The Cauchy distribution is a symmetric continuous probability distribution. For details about this distribution, see
/// <a href="http://en.wikipedia.org/wiki/Cauchy_distribution">Wikipedia - Cauchy distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can get/set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class Cauchy : IContinuousDistribution
{
System.Random _random;
@ -60,7 +55,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Initializes a new instance of the <see cref="Cauchy"/> class.
/// Initializes a new instance of the <see cref="Cauchy"/> class.
/// </summary>
/// <param name="location">The location (x0) of the distribution.</param>
/// <param name="scale">The scale (γ) of the distribution. Range: γ > 0.</param>
@ -71,7 +66,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Initializes a new instance of the <see cref="Cauchy"/> class.
/// Initializes a new instance of the <see cref="Cauchy"/> class.
/// </summary>
/// <param name="location">The location (x0) of the distribution.</param>
/// <param name="scale">The scale (γ) of the distribution. Range: γ > 0.</param>

13
src/Numerics/Distributions/Chi.cs

@ -37,16 +37,11 @@ namespace MathNet.Numerics.Distributions
{
/// <summary>
/// Continuous Univariate Chi distribution.
/// This distribution is a continuous probability distribution. The distribution usually arises when a k-dimensional vector's orthogonal
/// components are independent and each follow a standard normal distribution. The length of the vector will
/// This distribution is a continuous probability distribution. The distribution usually arises when a k-dimensional vector's orthogonal
/// components are independent and each follow a standard normal distribution. The length of the vector will
/// then have a chi distribution.
/// <a href="http://en.wikipedia.org/wiki/Chi_distribution">Wikipedia - Chi distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class Chi : IContinuousDistribution
{
System.Random _random;
@ -54,7 +49,7 @@ namespace MathNet.Numerics.Distributions
double _freedom;
/// <summary>
/// Initializes a new instance of the <see cref="Chi"/> class.
/// Initializes a new instance of the <see cref="Chi"/> class.
/// </summary>
/// <param name="freedom">The degrees of freedom (k) of the distribution. Range: k > 0.</param>
public Chi(double freedom)
@ -64,7 +59,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Initializes a new instance of the <see cref="Chi"/> class.
/// Initializes a new instance of the <see cref="Chi"/> class.
/// </summary>
/// <param name="freedom">The degrees of freedom (k) of the distribution. Range: k > 0.</param>
/// <param name="randomSource">The random number generator which is used to draw random samples.</param>

9
src/Numerics/Distributions/ChiSquared.cs

@ -40,11 +40,6 @@ namespace MathNet.Numerics.Distributions
/// This distribution is a sum of the squares of k independent standard normal random variables.
/// <a href="http://en.wikipedia.org/wiki/Chi-square_distribution">Wikipedia - ChiSquare distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class ChiSquared : IContinuousDistribution
{
System.Random _random;
@ -52,7 +47,7 @@ namespace MathNet.Numerics.Distributions
double _freedom;
/// <summary>
/// Initializes a new instance of the <see cref="ChiSquared"/> class.
/// Initializes a new instance of the <see cref="ChiSquared"/> class.
/// </summary>
/// <param name="freedom">The degrees of freedom (k) of the distribution. Range: k > 0.</param>
public ChiSquared(double freedom)
@ -62,7 +57,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Initializes a new instance of the <see cref="ChiSquared"/> class.
/// Initializes a new instance of the <see cref="ChiSquared"/> class.
/// </summary>
/// <param name="freedom">The degrees of freedom (k) of the distribution. Range: k > 0.</param>
/// <param name="randomSource">The random number generator which is used to draw random samples.</param>

7
src/Numerics/Distributions/ContinuousUniform.cs

@ -37,14 +37,9 @@ namespace MathNet.Numerics.Distributions
{
/// <summary>
/// Continuous Univariate Uniform distribution.
/// The continuous uniform distribution is a distribution over real numbers. For details about this distribution, see
/// The continuous uniform distribution is a distribution over real numbers. For details about this distribution, see
/// <a href="http://en.wikipedia.org/wiki/Uniform_distribution_%28continuous%29">Wikipedia - Continuous uniform distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can get/set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class ContinuousUniform : IContinuousDistribution
{
System.Random _random;

13
src/Numerics/Distributions/ConwayMaxwellPoisson.cs

@ -39,7 +39,7 @@ namespace MathNet.Numerics.Distributions
/// Discrete Univariate Conway-Maxwell-Poisson distribution.
/// <para>The Conway-Maxwell-Poisson distribution is a generalization of the Poisson, Geometric and Bernoulli
/// distributions. It is parameterized by two real numbers "lambda" and "nu". For
/// <list>
/// <list>
/// <item>nu = 0 the distribution reverts to a Geometric distribution</item>
/// <item>nu = 1 the distribution reverts to the Poisson distribution</item>
/// <item>nu -> infinity the distribution converges to a Bernoulli distribution</item>
@ -47,11 +47,6 @@ namespace MathNet.Numerics.Distributions
/// This implementation will cache the value of the normalization constant.
/// <a href="http://en.wikipedia.org/wiki/Conway%E2%80%93Maxwell%E2%80%93Poisson_distribution">Wikipedia - ConwayMaxwellPoisson distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class ConwayMaxwellPoisson : IDiscreteDistribution
{
System.Random _random;
@ -81,7 +76,7 @@ namespace MathNet.Numerics.Distributions
const double Tolerance = 1e-12;
/// <summary>
/// Initializes a new instance of the <see cref="ConwayMaxwellPoisson"/> class.
/// Initializes a new instance of the <see cref="ConwayMaxwellPoisson"/> class.
/// </summary>
/// <param name="lambda">The lambda (λ) parameter. Range: λ > 0.</param>
/// <param name="nu">The rate of decay (ν) parameter. Range: ν ≥ 0.</param>
@ -92,7 +87,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Initializes a new instance of the <see cref="ConwayMaxwellPoisson"/> class.
/// Initializes a new instance of the <see cref="ConwayMaxwellPoisson"/> class.
/// </summary>
/// <param name="lambda">The lambda (λ) parameter. Range: λ > 0.</param>
/// <param name="nu">The rate of decay (ν) parameter. Range: ν ≥ 0.</param>
@ -113,7 +108,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Checks whether the parameters of the distribution are valid.
/// Checks whether the parameters of the distribution are valid.
/// </summary>
/// <param name="lambda">The lambda (λ) parameter. Range: λ > 0.</param>
/// <param name="nu">The rate of decay (ν) parameter. Range: ν ≥ 0.</param>

13
src/Numerics/Distributions/Dirichlet.cs

@ -36,14 +36,9 @@ using MathNet.Numerics.Random;
namespace MathNet.Numerics.Distributions
{
/// <summary>
/// Multivariate Dirichlet distribution. For details about this distribution, see
/// Multivariate Dirichlet distribution. For details about this distribution, see
/// <a href="http://en.wikipedia.org/wiki/Dirichlet_distribution">Wikipedia - Dirichlet distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can get/set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class Dirichlet : IDistribution
{
System.Random _random;
@ -74,7 +69,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Initializes a new instance of the <see cref="Dirichlet"/> class.
/// Initializes a new instance of the <see cref="Dirichlet"/> class.
/// <seealso cref="System.Random"/>random number generator.</summary>
/// <param name="alpha">The value of each parameter of the Dirichlet distribution.</param>
/// <param name="k">The dimension of the Dirichlet distribution.</param>
@ -92,7 +87,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Initializes a new instance of the <see cref="Dirichlet"/> class.
/// Initializes a new instance of the <see cref="Dirichlet"/> class.
/// <seealso cref="System.Random"/>random number generator.</summary>
/// <param name="alpha">The value of each parameter of the Dirichlet distribution.</param>
/// <param name="k">The dimension of the Dirichlet distribution.</param>
@ -252,7 +247,7 @@ namespace MathNet.Numerics.Distributions
/// </summary>
/// <param name="x">The locations at which to compute the density.</param>
/// <returns>the density at <paramref name="x"/>.</returns>
/// <remarks>The Dirichlet distribution requires that the sum of the components of x equals 1.
/// <remarks>The Dirichlet distribution requires that the sum of the components of x equals 1.
/// You can also leave out the last <paramref name="x"/> component, and it will be computed from the others. </remarks>
public double Density(double[] x)
{

7
src/Numerics/Distributions/DiscreteUniform.cs

@ -41,11 +41,6 @@ namespace MathNet.Numerics.Distributions
/// is parameterized by a lower and upper bound (both inclusive).
/// <a href="http://en.wikipedia.org/wiki/Uniform_distribution_%28discrete%29">Wikipedia - Discrete uniform distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class DiscreteUniform : IDiscreteDistribution
{
System.Random _random;
@ -88,7 +83,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Checks whether the parameters of the distribution are valid.
/// Checks whether the parameters of the distribution are valid.
/// </summary>
/// <param name="lower">Lower bound. Range: lower ≤ upper.</param>
/// <param name="upper">Upper bound. Range: lower ≤ upper.</param>

9
src/Numerics/Distributions/Erlang.cs

@ -41,11 +41,6 @@ namespace MathNet.Numerics.Distributions
/// relation to the exponential and Gamma distributions.
/// <a href="http://en.wikipedia.org/wiki/Erlang_distribution">Wikipedia - Erlang distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class Erlang : IContinuousDistribution
{
System.Random _random;
@ -54,7 +49,7 @@ namespace MathNet.Numerics.Distributions
double _rate;
/// <summary>
/// Initializes a new instance of the <see cref="Erlang"/> class.
/// Initializes a new instance of the <see cref="Erlang"/> class.
/// </summary>
/// <param name="shape">The shape (k) of the Erlang distribution. Range: k ≥ 0.</param>
/// <param name="rate">The rate or inverse scale (λ) of the Erlang distribution. Range: λ ≥ 0.</param>
@ -65,7 +60,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Initializes a new instance of the <see cref="Erlang"/> class.
/// Initializes a new instance of the <see cref="Erlang"/> class.
/// </summary>
/// <param name="shape">The shape (k) of the Erlang distribution. Range: k ≥ 0.</param>
/// <param name="rate">The rate or inverse scale (λ) of the Erlang distribution. Range: λ ≥ 0.</param>

5
src/Numerics/Distributions/Exponential.cs

@ -40,11 +40,6 @@ namespace MathNet.Numerics.Distributions
/// The exponential distribution is a distribution over the real numbers parameterized by one non-negative parameter.
/// <a href="http://en.wikipedia.org/wiki/Exponential_distribution">Wikipedia - exponential distribution</a>.
/// </summary>
/// <remarks>The distribution will use the <see cref="System.Random"/> by default.
/// <para>Users can set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class Exponential : IContinuousDistribution
{
System.Random _random;

11
src/Numerics/Distributions/FisherSnedecor.cs

@ -37,14 +37,9 @@ namespace MathNet.Numerics.Distributions
{
/// <summary>
/// Continuous Univariate F-distribution, also known as Fisher-Snedecor distribution.
/// For details about this distribution, see
/// For details about this distribution, see
/// <a href="http://en.wikipedia.org/wiki/F-distribution">Wikipedia - FisherSnedecor distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class FisherSnedecor : IContinuousDistribution
{
System.Random _random;
@ -53,7 +48,7 @@ namespace MathNet.Numerics.Distributions
double _freedom2;
/// <summary>
/// Initializes a new instance of the <see cref="FisherSnedecor"/> class.
/// Initializes a new instance of the <see cref="FisherSnedecor"/> class.
/// </summary>
/// <param name="d1">The first degree of freedom (d1) of the distribution. Range: d1 > 0.</param>
/// <param name="d2">The second degree of freedom (d2) of the distribution. Range: d2 > 0.</param>
@ -64,7 +59,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Initializes a new instance of the <see cref="FisherSnedecor"/> class.
/// Initializes a new instance of the <see cref="FisherSnedecor"/> class.
/// </summary>
/// <param name="d1">The first degree of freedom (d1) of the distribution. Range: d1 > 0.</param>
/// <param name="d2">The second degree of freedom (d2) of the distribution. Range: d2 > 0.</param>

17
src/Numerics/Distributions/Gamma.cs

@ -37,22 +37,19 @@ namespace MathNet.Numerics.Distributions
{
/// <summary>
/// Continuous Univariate Gamma distribution.
/// For details about this distribution, see
/// For details about this distribution, see
/// <a href="http://en.wikipedia.org/wiki/Gamma_distribution">Wikipedia - Gamma distribution</a>.
/// </summary>
/// <remarks>
/// <para>The Gamma distribution is parametrized by a shape and inverse scale parameter. When we want
/// The Gamma distribution is parametrized by a shape and inverse scale parameter. When we want
/// to specify a Gamma distribution which is a point distribution we set the shape parameter to be the
/// location of the point distribution and the inverse scale as positive infinity. The distribution
/// with shape and inverse scale both zero is undefined.</para>
/// <para> Random number generation for the Gamma distribution is based on the algorithm in:
/// with shape and inverse scale both zero is undefined.
///
/// Random number generation for the Gamma distribution is based on the algorithm in:
/// "A Simple Method for Generating Gamma Variables" - Marsaglia &amp; Tsang
/// ACM Transactions on Mathematical Software, Vol. 26, No. 3, September 2000, Pages 363–372.</para>
/// <para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can get/set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
/// ACM Transactions on Mathematical Software, Vol. 26, No. 3, September 2000, Pages 363–372.
/// </remarks>
public class Gamma : IContinuousDistribution
{
System.Random _random;

7
src/Numerics/Distributions/Geometric.cs

@ -41,11 +41,6 @@ namespace MathNet.Numerics.Distributions
/// This implementation of the Geometric distribution will never generate 0's.
/// <a href="http://en.wikipedia.org/wiki/Geometric_distribution">Wikipedia - geometric distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class Geometric : IDiscreteDistribution
{
System.Random _random;
@ -83,7 +78,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Checks whether the parameters of the distribution are valid.
/// Checks whether the parameters of the distribution are valid.
/// </summary>
/// <param name="p">The probability (p) of generating one. Range: 0 ≤ p ≤ 1.</param>
/// <returns><c>true</c> when the parameters are valid, <c>false</c> otherwise.</returns>

10
src/Numerics/Distributions/Hypergeometric.cs

@ -37,17 +37,11 @@ namespace MathNet.Numerics.Distributions
{
/// <summary>
/// Discrete Univariate Hypergeometric distribution.
/// This distribution is a discrete probability distribution that describes the number of successes in a sequence
/// of n draws from a finite population without replacement, just as the binomial distribution
/// This distribution is a discrete probability distribution that describes the number of successes in a sequence
/// of n draws from a finite population without replacement, just as the binomial distribution
/// describes the number of successes for draws with replacement
/// <a href="http://en.wikipedia.org/wiki/Hypergeometric_distribution">Wikipedia - Hypergeometric distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can set the random number generator by using the <see cref="RandomSource"/> property</para>.
/// <para>
/// The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class Hypergeometric : IDiscreteDistribution
{
System.Random _random;

9
src/Numerics/Distributions/InverseGamma.cs

@ -42,11 +42,6 @@ namespace MathNet.Numerics.Distributions
/// two positive parameters.
/// <a href="http://en.wikipedia.org/wiki/Inverse-gamma_distribution">Wikipedia - InverseGamma distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class InverseGamma : IContinuousDistribution
{
System.Random _random;
@ -55,7 +50,7 @@ namespace MathNet.Numerics.Distributions
double _scale;
/// <summary>
/// Initializes a new instance of the <see cref="InverseGamma"/> class.
/// Initializes a new instance of the <see cref="InverseGamma"/> class.
/// </summary>
/// <param name="shape">The shape (α) of the distribution. Range: α > 0.</param>
/// <param name="scale">The scale (β) of the distribution. Range: β > 0.</param>
@ -66,7 +61,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Initializes a new instance of the <see cref="InverseGamma"/> class.
/// Initializes a new instance of the <see cref="InverseGamma"/> class.
/// </summary>
/// <param name="shape">The shape (α) of the distribution. Range: α > 0.</param>
/// <param name="scale">The scale (β) of the distribution. Range: β > 0.</param>

11
src/Numerics/Distributions/InverseWishart.cs

@ -42,11 +42,6 @@ namespace MathNet.Numerics.Distributions
/// is the conjugate prior for the covariance matrix of a multivariate normal distribution.
/// <a href="http://en.wikipedia.org/wiki/Inverse-Wishart_distribution">Wikipedia - Inverse-Wishart distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class InverseWishart : IDistribution
{
System.Random _random;
@ -60,7 +55,7 @@ namespace MathNet.Numerics.Distributions
Cholesky<double> _chol;
/// <summary>
/// Initializes a new instance of the <see cref="InverseWishart"/> class.
/// Initializes a new instance of the <see cref="InverseWishart"/> class.
/// </summary>
/// <param name="degreesOfFreedom">The degree of freedom (ν) for the inverse Wishart distribution.</param>
/// <param name="scale">The scale matrix (Ψ) for the inverse Wishart distribution.</param>
@ -71,7 +66,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Initializes a new instance of the <see cref="InverseWishart"/> class.
/// Initializes a new instance of the <see cref="InverseWishart"/> class.
/// </summary>
/// <param name="degreesOfFreedom">The degree of freedom (ν) for the inverse Wishart distribution.</param>
/// <param name="scale">The scale matrix (Ψ) for the inverse Wishart distribution.</param>
@ -92,7 +87,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Checks whether the parameters of the distribution are valid.
/// Checks whether the parameters of the distribution are valid.
/// </summary>
/// <param name="degreesOfFreedom">The degree of freedom (ν) for the inverse Wishart distribution.</param>
/// <param name="scale">The scale matrix (Ψ) for the inverse Wishart distribution.</param>

11
src/Numerics/Distributions/Laplace.cs

@ -42,11 +42,6 @@ namespace MathNet.Numerics.Distributions
/// p(x) = \frac{1}{2 * scale} \exp{- |x - mean| / scale}.
/// <a href="http://en.wikipedia.org/wiki/Laplace_distribution">Wikipedia - Laplace distribution</a>.
/// </summary>
/// <remarks>The distribution will use the <see cref="System.Random"/> by default.
/// <para>Users can set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class Laplace : IContinuousDistribution
{
System.Random _random;
@ -55,7 +50,7 @@ namespace MathNet.Numerics.Distributions
double _scale;
/// <summary>
/// Initializes a new instance of the <see cref="Laplace"/> class (location = 0, scale = 1).
/// Initializes a new instance of the <see cref="Laplace"/> class (location = 0, scale = 1).
/// </summary>
public Laplace()
: this(0.0, 1.0)
@ -63,7 +58,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Initializes a new instance of the <see cref="Laplace"/> class.
/// Initializes a new instance of the <see cref="Laplace"/> class.
/// </summary>
/// <param name="location">The location (μ) of the distribution.</param>
/// <param name="scale">The scale (b) of the distribution. Range: b > 0.</param>
@ -75,7 +70,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Initializes a new instance of the <see cref="Laplace"/> class.
/// Initializes a new instance of the <see cref="Laplace"/> class.
/// </summary>
/// <param name="location">The location (μ) of the distribution.</param>
/// <param name="scale">The scale (b) of the distribution. Range: b > 0.</param>

11
src/Numerics/Distributions/LogNormal.cs

@ -39,14 +39,9 @@ namespace MathNet.Numerics.Distributions
{
/// <summary>
/// Continuous Univariate Log-Normal distribution.
/// For details about this distribution, see
/// For details about this distribution, see
/// <a href="http://en.wikipedia.org/wiki/Log-normal_distribution">Wikipedia - Log-Normal distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can get/set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class LogNormal : IContinuousDistribution
{
System.Random _random;
@ -55,7 +50,7 @@ namespace MathNet.Numerics.Distributions
double _sigma;
/// <summary>
/// Initializes a new instance of the <see cref="LogNormal"/> class.
/// Initializes a new instance of the <see cref="LogNormal"/> class.
/// The distribution will be initialized with the default <seealso cref="System.Random"/>
/// random number generator.
/// </summary>
@ -68,7 +63,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Initializes a new instance of the <see cref="LogNormal"/> class.
/// Initializes a new instance of the <see cref="LogNormal"/> class.
/// The distribution will be initialized with the default <seealso cref="System.Random"/>
/// random number generator.
/// </summary>

13
src/Numerics/Distributions/MatrixNormal.cs

@ -42,17 +42,12 @@ namespace MathNet.Numerics.Distributions
/// for the columns (K). If the dimension of M is d-by-m then V is d-by-d and K is m-by-m.
/// <a href="http://en.wikipedia.org/wiki/Matrix_normal_distribution">Wikipedia - MatrixNormal distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class MatrixNormal : IDistribution
{
System.Random _random;
/// <summary>
/// The mean of the matrix normal distribution.
/// The mean of the matrix normal distribution.
/// </summary>
Matrix<double> _m;
@ -67,7 +62,7 @@ namespace MathNet.Numerics.Distributions
Matrix<double> _k;
/// <summary>
/// Initializes a new instance of the <see cref="MatrixNormal"/> class.
/// Initializes a new instance of the <see cref="MatrixNormal"/> class.
/// </summary>
/// <param name="m">The mean of the matrix normal.</param>
/// <param name="v">The covariance matrix for the rows.</param>
@ -80,7 +75,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Initializes a new instance of the <see cref="MatrixNormal"/> class.
/// Initializes a new instance of the <see cref="MatrixNormal"/> class.
/// </summary>
/// <param name="m">The mean of the matrix normal.</param>
/// <param name="v">The covariance matrix for the rows.</param>
@ -105,7 +100,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Checks whether the parameters of the distribution are valid.
/// Checks whether the parameters of the distribution are valid.
/// </summary>
/// <param name="m">The mean of the matrix normal.</param>
/// <param name="v">The covariance matrix for the rows.</param>

33
src/Numerics/Distributions/Multinomial.cs

@ -40,17 +40,14 @@ using MathNet.Numerics.Statistics;
namespace MathNet.Numerics.Distributions
{
/// <summary>
/// Multivariate Multinomial distribution. For details about this distribution, see
/// Multivariate Multinomial distribution. For details about this distribution, see
/// <a href="http://en.wikipedia.org/wiki/Multinomial_distribution">Wikipedia - Multinomial distribution</a>.
/// </summary>
/// <remarks><para>The distribution is parameterized by a vector of ratios: in other words, the parameter
/// <remarks>
/// The distribution is parameterized by a vector of ratios: in other words, the parameter
/// does not have to be normalized and sum to 1. The reason is that some vectors can't be exactly normalized
/// to sum to 1 in floating point representation.</para>
/// <para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
/// to sum to 1 in floating point representation.
/// </remarks>
public class Multinomial : IDistribution
{
System.Random _random;
@ -68,7 +65,7 @@ namespace MathNet.Numerics.Distributions
/// <summary>
/// Initializes a new instance of the Multinomial class.
/// </summary>
/// <param name="p">An array of nonnegative ratios: this array does not need to be normalized
/// <param name="p">An array of nonnegative ratios: this array does not need to be normalized
/// as this is often impossible using floating point arithmetic.</param>
/// <param name="n">The number of trials.</param>
/// <exception cref="ArgumentOutOfRangeException">If any of the probabilities are negative or do not sum to one.</exception>
@ -82,7 +79,7 @@ namespace MathNet.Numerics.Distributions
/// <summary>
/// Initializes a new instance of the Multinomial class.
/// </summary>
/// <param name="p">An array of nonnegative ratios: this array does not need to be normalized
/// <param name="p">An array of nonnegative ratios: this array does not need to be normalized
/// as this is often impossible using floating point arithmetic.</param>
/// <param name="n">The number of trials.</param>
/// <param name="randomSource">The random number generator which is used to draw random samples.</param>
@ -132,12 +129,12 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Checks whether the parameters of the distribution are valid.
/// Checks whether the parameters of the distribution are valid.
/// </summary>
/// <param name="p">An array of nonnegative ratios: this array does not need to be normalized
/// <param name="p">An array of nonnegative ratios: this array does not need to be normalized
/// as this is often impossible using floating point arithmetic.</param>
/// <param name="n">The number of trials.</param>
/// <returns>If any of the probabilities are negative returns <c>false</c>,
/// <returns>If any of the probabilities are negative returns <c>false</c>,
/// if the sum of parameters is 0.0, or if the number of trials is negative; otherwise <c>true</c>.</returns>
static bool IsValidParameterSet(IEnumerable<double> p, int n)
{
@ -163,7 +160,7 @@ namespace MathNet.Numerics.Distributions
/// <summary>
/// Sets the parameters of the distribution after checking their validity.
/// </summary>
/// <param name="p">An array of nonnegative ratios: this array does not need to be normalized
/// <param name="p">An array of nonnegative ratios: this array does not need to be normalized
/// as this is often impossible using floating point arithmetic.</param>
/// <param name="n">The number of trials.</param>
/// <exception cref="ArgumentOutOfRangeException">When the parameters are out of range.</exception>
@ -220,7 +217,7 @@ namespace MathNet.Numerics.Distributions
{
get
{
// Do not use _p, because operations below will modify _p array. Use P or _p.Clone().
// Do not use _p, because operations below will modify _p array. Use P or _p.Clone().
var res = (DenseVector) P;
for (var i = 0; i < res.Count; i++)
{
@ -238,7 +235,7 @@ namespace MathNet.Numerics.Distributions
{
get
{
// Do not use _p, because operations below will modify _p array. Use P or _p.Clone().
// Do not use _p, because operations below will modify _p array. Use P or _p.Clone().
var res = (DenseVector) P;
for (var i = 0; i < res.Count; i++)
{
@ -337,7 +334,7 @@ namespace MathNet.Numerics.Distributions
/// Samples one multinomial distributed random variable.
/// </summary>
/// <param name="rnd">The random number generator to use.</param>
/// <param name="p">An array of nonnegative ratios: this array does not need to be normalized
/// <param name="p">An array of nonnegative ratios: this array does not need to be normalized
/// as this is often impossible using floating point arithmetic.</param>
/// <param name="n">The number of trials.</param>
/// <returns>the counts for each of the different possible values.</returns>
@ -366,7 +363,7 @@ namespace MathNet.Numerics.Distributions
/// Samples a multinomially distributed random variable.
/// </summary>
/// <param name="rnd">The random number generator to use.</param>
/// <param name="p">An array of nonnegative ratios: this array does not need to be normalized
/// <param name="p">An array of nonnegative ratios: this array does not need to be normalized
/// as this is often impossible using floating point arithmetic.</param>
/// <param name="n">The number of variables needed.</param>
/// <returns>a sequence of counts for each of the different possible values.</returns>

13
src/Numerics/Distributions/NegativeBinomial.cs

@ -42,11 +42,6 @@ namespace MathNet.Numerics.Distributions
/// when the probability of head is p.
/// <a href="http://en.wikipedia.org/wiki/Negative_binomial_distribution">Wikipedia - NegativeBinomial distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class NegativeBinomial : IDiscreteDistribution
{
System.Random _random;
@ -55,7 +50,7 @@ namespace MathNet.Numerics.Distributions
double _p;
/// <summary>
/// Initializes a new instance of the <see cref="NegativeBinomial"/> class.
/// Initializes a new instance of the <see cref="NegativeBinomial"/> class.
/// </summary>
/// <param name="r">The number of failures (r) until the experiment stopped. Range: r ≥ 0.</param>
/// <param name="p">The probability (p) of a trial resulting in success. Range: 0 ≤ p ≤ 1.</param>
@ -66,7 +61,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Initializes a new instance of the <see cref="NegativeBinomial"/> class.
/// Initializes a new instance of the <see cref="NegativeBinomial"/> class.
/// </summary>
/// <param name="r">The number of failures (r) until the experiment stopped. Range: r ≥ 0.</param>
/// <param name="p">The probability (p) of a trial resulting in success. Range: 0 ≤ p ≤ 1.</param>
@ -89,11 +84,11 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Checks whether the parameters of the distribution are valid.
/// Checks whether the parameters of the distribution are valid.
/// </summary>
/// <param name="r">The number of failures (r) until the experiment stopped. Range: r ≥ 0.</param>
/// <param name="p">The probability (p) of a trial resulting in success. Range: 0 ≤ p ≤ 1.</param>
/// <returns><c>true</c> when the parameters are valid, <c>false</c> otherwise.</returns>
/// <returns><c>true</c> when the parameters are valid, <c>false</c> otherwise.</returns>
static bool IsValidParameterSet(double r, double p)
{
return r >= 0.0 && p >= 0.0 && p <= 1.0;

7
src/Numerics/Distributions/Normal.cs

@ -38,14 +38,9 @@ namespace MathNet.Numerics.Distributions
{
/// <summary>
/// Continuous Univariate Normal distribution, also known as Gaussian distribution.
/// For details about this distribution, see
/// For details about this distribution, see
/// <a href="http://en.wikipedia.org/wiki/Normal_distribution">Wikipedia - Normal distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can get/set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class Normal : IContinuousDistribution
{
System.Random _random;

13
src/Numerics/Distributions/NormalGamma.cs

@ -52,7 +52,7 @@ namespace MathNet.Numerics.Distributions
double _precision;
/// <summary>
/// Initializes a new instance of the <see cref="MeanPrecisionPair"/> struct.
/// Initializes a new instance of the <see cref="MeanPrecisionPair"/> struct.
/// </summary>
/// <param name="m">The mean of the pair.</param>
/// <param name="p">The precision of the pair.</param>
@ -96,11 +96,6 @@ namespace MathNet.Numerics.Distributions
/// will be positive infinity. A completely degenerate NormalGamma distribution with known mean and precision is possible as well.</para>
/// <a href="http://en.wikipedia.org/wiki/Normal-gamma_distribution">Wikipedia - Normal-Gamma distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can get/set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class NormalGamma : IDistribution
{
System.Random _random;
@ -111,7 +106,7 @@ namespace MathNet.Numerics.Distributions
double _precisionInvScale;
/// <summary>
/// Initializes a new instance of the <see cref="NormalGamma"/> class.
/// Initializes a new instance of the <see cref="NormalGamma"/> class.
/// </summary>
/// <param name="meanLocation">The location of the mean.</param>
/// <param name="meanScale">The scale of the mean.</param>
@ -124,7 +119,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Initializes a new instance of the <see cref="NormalGamma"/> class.
/// Initializes a new instance of the <see cref="NormalGamma"/> class.
/// </summary>
/// <param name="meanLocation">The location of the mean.</param>
/// <param name="meanScale">The scale of the mean.</param>
@ -148,7 +143,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Checks whether the parameters of the distribution are valid.
/// Checks whether the parameters of the distribution are valid.
/// </summary>
/// <param name="meanLocation">The location of the mean.</param>
/// <param name="meanScale">The scale of the mean.</param>

13
src/Numerics/Distributions/Pareto.cs

@ -37,16 +37,11 @@ namespace MathNet.Numerics.Distributions
{
/// <summary>
/// Continuous Univariate Pareto distribution.
/// The Pareto distribution is a power law probability distribution that coincides with social,
/// The Pareto distribution is a power law probability distribution that coincides with social,
/// scientific, geophysical, actuarial, and many other types of observable phenomena.
/// For details about this distribution, see
/// For details about this distribution, see
/// <a href="http://en.wikipedia.org/wiki/Pareto_distribution">Wikipedia - Pareto distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can get/set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class Pareto : IContinuousDistribution
{
System.Random _random;
@ -55,7 +50,7 @@ namespace MathNet.Numerics.Distributions
double _shape;
/// <summary>
/// Initializes a new instance of the <see cref="Pareto"/> class.
/// Initializes a new instance of the <see cref="Pareto"/> class.
/// </summary>
/// <param name="scale">The scale (xm) of the distribution. Range: xm > 0.</param>
/// <param name="shape">The shape (α) of the distribution. Range: α > 0.</param>
@ -67,7 +62,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Initializes a new instance of the <see cref="Pareto"/> class.
/// Initializes a new instance of the <see cref="Pareto"/> class.
/// </summary>
/// <param name="scale">The scale (xm) of the distribution. Range: xm > 0.</param>
/// <param name="shape">The shape (α) of the distribution. Range: α > 0.</param>

15
src/Numerics/Distributions/Rayleigh.cs

@ -37,17 +37,12 @@ namespace MathNet.Numerics.Distributions
{
/// <summary>
/// Continuous Univariate Rayleigh distribution.
/// The Rayleigh distribution (pronounced /ˈreɪli/) is a continuous probability distribution. As an
/// example of how it arises, the wind speed will have a Rayleigh distribution if the components of
/// The Rayleigh distribution (pronounced /ˈreɪli/) is a continuous probability distribution. As an
/// example of how it arises, the wind speed will have a Rayleigh distribution if the components of
/// the two-dimensional wind velocity vector are uncorrelated and normally distributed with equal variance.
/// For details about this distribution, see
/// For details about this distribution, see
/// <a href="http://en.wikipedia.org/wiki/Rayleigh_distribution">Wikipedia - Rayleigh distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can get/set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class Rayleigh : IContinuousDistribution
{
System.Random _random;
@ -55,7 +50,7 @@ namespace MathNet.Numerics.Distributions
double _scale;
/// <summary>
/// Initializes a new instance of the <see cref="Rayleigh"/> class.
/// Initializes a new instance of the <see cref="Rayleigh"/> class.
/// </summary>
/// <param name="scale">The scale (σ) of the distribution. Range: σ > 0.</param>
/// <exception cref="ArgumentException">If <paramref name="scale"/> is negative.</exception>
@ -66,7 +61,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Initializes a new instance of the <see cref="Rayleigh"/> class.
/// Initializes a new instance of the <see cref="Rayleigh"/> class.
/// </summary>
/// <param name="scale">The scale (σ) of the distribution. Range: σ > 0.</param>
/// <param name="randomSource">The random number generator which is used to draw random samples.</param>

5
src/Numerics/Distributions/Stable.cs

@ -43,11 +43,6 @@ namespace MathNet.Numerics.Distributions
/// For details about this distribution, see
/// <a href="http://en.wikipedia.org/wiki/Stable_distribution">Wikipedia - Stable distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.`
/// Users can get/set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class Stable : IContinuousDistribution
{
System.Random _random;

8
src/Numerics/Distributions/Weibull.cs

@ -41,12 +41,8 @@ namespace MathNet.Numerics.Distributions
/// <a href="http://en.wikipedia.org/wiki/Weibull_distribution">Wikipedia - Weibull distribution</a>.
/// </summary>
/// <remarks>
/// <para>The Weibull distribution is parametrized by a shape and scale parameter.</para>
/// <para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can get/set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
/// The Weibull distribution is parametrized by a shape and scale parameter.
/// </remarks>
public class Weibull : IContinuousDistribution
{
System.Random _random;

11
src/Numerics/Distributions/Wishart.cs

@ -44,11 +44,6 @@ namespace MathNet.Numerics.Distributions
/// normal distribution.
/// <a href="http://en.wikipedia.org/wiki/Wishart_distribution">Wikipedia - Wishart distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class Wishart : IDistribution
{
System.Random _random;
@ -69,7 +64,7 @@ namespace MathNet.Numerics.Distributions
Cholesky<double> _chol;
/// <summary>
/// Initializes a new instance of the <see cref="Wishart"/> class.
/// Initializes a new instance of the <see cref="Wishart"/> class.
/// </summary>
/// <param name="degreesOfFreedom">The degrees of freedom (n) for the Wishart distribution.</param>
/// <param name="scale">The scale matrix (V) for the Wishart distribution.</param>
@ -80,7 +75,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Initializes a new instance of the <see cref="Wishart"/> class.
/// Initializes a new instance of the <see cref="Wishart"/> class.
/// </summary>
/// <param name="degreesOfFreedom">The degrees of freedom (n) for the Wishart distribution.</param>
/// <param name="scale">The scale matrix (V) for the Wishart distribution.</param>
@ -110,7 +105,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Checks whether the parameters of the distribution are valid.
/// Checks whether the parameters of the distribution are valid.
/// </summary>
/// <param name="degreesOfFreedom">The degrees of freedom (n) for the Wishart distribution.</param>
/// <param name="scale">The scale matrix (V) for the Wishart distribution.</param>

17
src/Numerics/Distributions/Zipf.cs

@ -37,17 +37,12 @@ namespace MathNet.Numerics.Distributions
{
/// <summary>
/// Discrete Univariate Zipf distribution.
/// Zipf's law, an empirical law formulated using mathematical statistics, refers to the fact
/// that many types of data studied in the physical and social sciences can be approximated with
/// Zipf's law, an empirical law formulated using mathematical statistics, refers to the fact
/// that many types of data studied in the physical and social sciences can be approximated with
/// a Zipfian distribution, one of a family of related discrete power law probability distributions.
/// For details about this distribution, see
/// For details about this distribution, see
/// <a href="http://en.wikipedia.org/wiki/Zipf%27s_law">Wikipedia - Zipf distribution</a>.
/// </summary>
/// <remarks><para>The distribution will use the <see cref="System.Random"/> by default.
/// Users can get/set the random number generator by using the <see cref="RandomSource"/> property.</para>
/// <para>The statistics classes will check all the incoming parameters whether they are in the allowed
/// range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters
/// to <c>false</c>, all parameter checks can be turned off.</para></remarks>
public class Zipf : IDiscreteDistribution
{
System.Random _random;
@ -63,7 +58,7 @@ namespace MathNet.Numerics.Distributions
int _n;
/// <summary>
/// Initializes a new instance of the <see cref="Zipf"/> class.
/// Initializes a new instance of the <see cref="Zipf"/> class.
/// </summary>
/// <param name="s">The s parameter of the distribution.</param>
/// <param name="n">The n parameter of the distribution.</param>
@ -74,7 +69,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Initializes a new instance of the <see cref="Zipf"/> class.
/// Initializes a new instance of the <see cref="Zipf"/> class.
/// </summary>
/// <param name="s">The s parameter of the distribution.</param>
/// <param name="n">The n parameter of the distribution.</param>
@ -95,7 +90,7 @@ namespace MathNet.Numerics.Distributions
}
/// <summary>
/// Checks whether the parameters of the distribution are valid.
/// Checks whether the parameters of the distribution are valid.
/// </summary>
/// <param name="s">The s parameter of the distribution.</param>
/// <param name="n">The n parameter of the distribution.</param>

Loading…
Cancel
Save