Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BernoulliIntegerSubset"/> class
        /// with the specified number of elements all of which are set to uniform.
        /// </summary>
        /// <param name="size">The size of the list.</param>
        /// <param name="tolerance">The tolerance for the approximation.</param>
        /// <returns>The new <see cref="BernoulliIntegerSubset"/> instance.</returns>
        public static BernoulliIntegerSubset FromSize(int size, double tolerance)
        {
            var result = new BernoulliIntegerSubset();

            result.SparseBernoulliList = SparseBernoulliList.FromSize(size, tolerance);
            return(result);
        }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BernoulliIntegerSubset"/> class
 /// with the specified number of elements all of which are set to uniform.
 /// </summary>
 /// <param name="size">The size of the list.</param>
 protected BernoulliIntegerSubset(int size)
 {
     SparseBernoulliList = SparseBernoulliList.FromSize(size);
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BernoulliIntegerSubset"/> class
 /// with the specified number of elements all of which are set to uniform.
 /// </summary>
 /// <param name="size">The size of the list.</param>
 /// <param name="tolerance">The tolerance for the approximation.</param>
 protected BernoulliIntegerSubset(int size, double tolerance)
 {
     SparseBernoulliList = SparseBernoulliList.FromSize(size, tolerance);
 }