private Fraction CalculateNum(Fraction[] partArray, Fraction k) { var function = new NumFunction(partArray, _n, k); var num = function.Calculate(); return(num); }
public void NumFunctionTest0() { Fraction[] x = { new Fraction(new BigInteger(0)), new Fraction(new BigInteger(0)), new Fraction(new BigInteger(1)), new Fraction(new BigInteger(1)) }; var n = new Fraction(new BigInteger(4)); var k = new Fraction(new BigInteger(2)); var numFunction = new NumFunction(x, n, k); Assert.AreEqual(new Fraction(0), numFunction.Calculate()); }
public void NumFunctionTest5() { Fraction[] x = { new Fraction(1), new Fraction(1), new Fraction(0), new Fraction(0) }; var n = new Fraction(4); var k = new Fraction(2); var numFunction = new NumFunction(x, n, k); Assert.AreEqual(new Fraction(5), numFunction.Calculate()); }
public void NumFunctionTest() { NumFunction numFunction = new NumFunction(x, n, k); Assert.AreEqual(new Fraction(3), numFunction.Calculate()); }