Пример #1
0
        private PlusSign[] ReturnNewtonIndeterminates(int order)
        {
            PlusSign[]         funcs = new PlusSign[order + 1];
            HNode              hNode = new HNode();
            NaturalNumberNode  orderNode;
            MultiplicationSign multiplicationSign;
            VariableNode       variableNode = new VariableNode();

            for (int i = 0; i <= order; i++)
            {
                orderNode          = new NaturalNumberNode(order - i);
                multiplicationSign = new MultiplicationSign(orderNode, hNode);
                funcs[i]           = new PlusSign(variableNode, multiplicationSign);
            }
            return(funcs);
        }
Пример #2
0
        public double ReturnNewtonDerivative(double x)
        {
            HNode hNode = new HNode();

            return((Calculate(x + hNode.Calculate(x)) - Calculate(x)) / hNode.Calculate(x));
        }
Пример #3
0
        private double CalculatePolynomialDerivative(double x, int order)
        {
            HNode hNode = new HNode();

            return(ReturnNewtonPolynomial(x, order).Calculate(x) / Math.Pow(hNode.Calculate(x), order));
        }