예제 #1
0
 /// <summary>
 /// Initializes a new shim that represents a discrete distribution as a continuous distribution.
 /// </summary>
 /// <param name="distribution">The discrete distiribution to represent.</param>
 public DiscreteAsContinuousDistribution(DiscreteDistribution distribution)
 {
     if (distribution == null)
     {
         throw new ArgumentNullException(nameof(distribution));
     }
     this.d        = distribution;
     this.xSupport = Interval.FromEndpoints(d.Support.LeftEndpoint, d.Support.RightEndpoint);
 }
예제 #2
0
 /// <summary>
 /// Initializes a new shim that represents a discrete distribution as a continuous distribution.
 /// </summary>
 /// <param name="distribution">The discrete distiribution to represent.</param>
 /// <param name="support">The continuous support interval into which the discrete support interval is to be mapped.</param>
 public DiscreteAsContinuousDistribution(DiscreteDistribution distribution, Interval support)
 {
     if (distribution == null)
     {
         throw new ArgumentNullException(nameof(distribution));
     }
     this.d        = distribution;
     this.xSupport = support;
 }
예제 #3
0
 /// <summary>
 /// Initializes a new shim that represents a discrete distribution as a continuous distribution.
 /// </summary>
 /// <param name="distribution">The discrete distiribution to represent.</param>
 public DiscreteAsContinuousDistribution(DiscreteDistribution distribution)
 {
     if (distribution == null)
     {
         throw new ArgumentNullException("distribution");
     }
     this.d        = distribution;
     this.xSupport = Interval.FromEndpoints(d.Minimum, d.Maximum);
 }