|
|
|
@ -31,6 +31,7 @@ |
|
|
|
using System; |
|
|
|
using System.Linq; |
|
|
|
using MathNet.Numerics.Distributions; |
|
|
|
using MathNet.Numerics.Random; |
|
|
|
|
|
|
|
namespace MathNet.Numerics.Statistics.Mcmc |
|
|
|
{ |
|
|
|
@ -84,7 +85,7 @@ namespace MathNet.Numerics.Statistics.Mcmc |
|
|
|
/// <param name="burnInterval">The number of iterations in between returning samples.</param>
|
|
|
|
/// <exception cref="ArgumentOutOfRangeException">When the number of burnInterval iteration is negative.</exception>
|
|
|
|
public HybridMC(double[] x0, DensityLn<double[]> pdfLnP, int frogLeapSteps, double stepSize, int burnInterval = 0) |
|
|
|
: this(x0, pdfLnP, frogLeapSteps, stepSize, burnInterval, new double[x0.Count()], new System.Random(Random.RandomSeed.Guid()), Grad) |
|
|
|
: this(x0, pdfLnP, frogLeapSteps, stepSize, burnInterval, new double[x0.Count()], MersenneTwister.Default, Grad) |
|
|
|
{ |
|
|
|
for (int i = 0; i < _length; i++) |
|
|
|
{ |
|
|
|
@ -108,7 +109,7 @@ namespace MathNet.Numerics.Statistics.Mcmc |
|
|
|
/// the components of the momentum.</param>
|
|
|
|
/// <exception cref="ArgumentOutOfRangeException">When the number of burnInterval iteration is negative.</exception>
|
|
|
|
public HybridMC(double[] x0, DensityLn<double[]> pdfLnP, int frogLeapSteps, double stepSize, int burnInterval, double[] pSdv) |
|
|
|
: this(x0, pdfLnP, frogLeapSteps, stepSize, burnInterval, pSdv, new System.Random(Random.RandomSeed.Guid())) |
|
|
|
: this(x0, pdfLnP, frogLeapSteps, stepSize, burnInterval, pSdv, MersenneTwister.Default) |
|
|
|
{ |
|
|
|
} |
|
|
|
|
|
|
|
|