/// <summary> /// Initializes a new instance of the <see cref="TruncatedPoisson" /> class. /// </summary> public TruncatedPoisson() { this.leftTruncatedDistribution = new LeftTruncatedPoisson(); this.SetToUniform(); }
/// <summary> /// Initializes a new instance of the <see cref="TruncatedPoisson" /> class. /// </summary> /// <param name="truncatedDistribution">The underlying left-truncated CoM-Poisson distribution.</param> public TruncatedPoisson(LeftTruncatedPoisson truncatedDistribution) : this(truncatedDistribution, PositiveInfinityEndPoint) { }
/// <summary> /// Initializes a new instance of the <see cref="TruncatedPoisson" /> class. /// </summary> /// <param name="leftTruncatedDistribution">The underlying left-truncated CoM-Poisson distribution.</param> /// <param name="endPoint">The index of the last non-zero term in the truncated distribution.</param> public TruncatedPoisson(LeftTruncatedPoisson leftTruncatedDistribution, int endPoint) { this.leftTruncatedDistribution = leftTruncatedDistribution; this.EndPoint = leftTruncatedDistribution.IsPointMass ? leftTruncatedDistribution.Point : endPoint; this.ResetCache(); }