コード例 #1
0
        public override object Clone()
        {
            PolynomialEquation <T> Copy = new PolynomialEquation <T>(Coefficients);

            Copy.SetGain(Gain);
            Copy.SetDependent(Dependent);
            return(Copy);
        }
コード例 #2
0
        public override Equation <T> Derivative()
        {
            T[] newCoefficients = new T[Order - 1];
            for (int i = Order; i > 0; i--)
            {
                newCoefficients[Order - i] = Coefficients[Order - i] * (dynamic)i;
            }
            PolynomialEquation <T> newPoly = new PolynomialEquation <T>(newCoefficients);

            newPoly.SetGain(Gain);
            newPoly.SetDependent(Dependent);
            return(newPoly * Dependent.Derivative());
        }