/// <summary> /// Создание копии экземпляра класса "система уравнений" для повторного присваивания. /// </summary> /// <returns></returns> public EquationsSystem Clone() { EquationsSystem clone = new EquationsSystem(); clone.EquationFunctions = new List <Func <double[], double[], double> >(); clone.EquationsCoefficients = new List <double[]>(); for (int i = 0; i < this.EquationFunctions.Count; i++) { clone.EquationFunctions.Add(new Func <double[], double[], double>(this.EquationFunctions[i].Invoke)); } for (int i = 0; i < this.EquationsCoefficients.Count; i++) { clone.EquationsCoefficients.Add(new double[this.EquationsCoefficients[i].Length]); for (int j = 0; j < clone.EquationsCoefficients[i].Length; j++) { clone.EquationsCoefficients[i][j] = this.EquationsCoefficients[i][j]; } } clone.VariableNames = new string[this.VariableNames.Length]; for (int i = 0; i < this.VariableNames.Length; i++) { clone.VariableNames[i] = this.VariableNames[i]; } return(clone); }
public NewtonRaphsonMethod(EquationsSystem system, ISolverSettings settings) { _eqSystem = system; _settings = settings; }