/// <summary> /// Returns a new instance of the <see cref="BernoulliIntegerSubset"/> class from a sparse list of Bernoulli distributions. /// </summary> /// <param name="bernoullis">The sparse list of Bernoulli distributions.</param> /// <param name="tolerance">The tolerance.</param> /// <returns>The new <see cref="BernoulliIntegerSubset"/> instance.</returns> public static BernoulliIntegerSubset FromSparseList(ISparseList <Bernoulli> bernoullis, double tolerance) { var result = new BernoulliIntegerSubset(); result.SparseBernoulliList = SparseBernoulliList.FromSparseList(bernoullis, tolerance); return(result); }
/// <summary> /// Initializes a new instance of the <see cref="BernoulliIntegerSubset"/> class from a sparse list of <see cref="Bernoulli"/> distributions. /// </summary> /// <param name="bernoullis">The sparse list of Bernoulli distributions.</param> protected BernoulliIntegerSubset(ISparseList <Bernoulli> bernoullis) { SparseBernoulliList = SparseBernoulliList.FromSparseList(bernoullis); }
/// <summary> /// Initializes a new instance of the <see cref="BernoulliIntegerSubset"/> class from a sparse list of Bernoulli distributions. /// </summary> /// <param name="bernoullis">The sparse list of Bernoulli distributions.</param> /// <param name="tolerance">The tolerance.</param> protected BernoulliIntegerSubset(ISparseList <Bernoulli> bernoullis, double tolerance) { SparseBernoulliList = SparseBernoulliList.FromSparseList(bernoullis, tolerance); }