/// <summary> /// Initializes a new instance of the <see cref="Integral" /> class. /// </summary> /// <param name="integrandExpression">Integrand expression of the integral.</param> /// <param name="startValue">Start value of the definite integral.</param> /// <param name="endValue">End value of the definite integral.</param> /// <param name="iterations">Amount of iterations.</param> /// <param name="parameterName">Name of the variable by which the integral is calculated.</param> public Integral(string integrandExpression, double startValue, double endValue, int iterations, string parameterName) { this.Variable = new Variable(parameterName, 0.0); this.Integrand = new Expression(integrandExpression, new List <Variable>() { this.Variable }); this.StartValue = startValue; this.EndValue = endValue; this.IterationsNumber = iterations; }
/// <summary> /// Initializes a new instance of the <see cref="IntegralVariable" /> class. /// </summary> /// <param name="integralVariable">Initial variable which is supposed to be copied to the current one</param> public IntegralVariable(IntegralVariable integralVariable) { this.Name = integralVariable.Name; this.Value = integralVariable.Value; }