예제 #1
0
        private static IArray <Fraction> Binomial(this Fraction fraction, uint size)
        {
            return(new Array <Fraction>(
                       size: size,
                       atF: index =>
            {
                var left = fraction.Complement().Power(index.Complement(size));
                var right = fraction.Power(index);

                var coefficient = size.Binomial()[index];

                return new Fraction(Fractions.Interval.Join(left, right).Content *coefficient);
            }));
        }