public static LinearEquation operator -(LinearEquation a) { LinearEquation res = new LinearEquation(a); for (int i = 0; i < res.coefficients.Length; i++) { res.coefficients[i] *= -1; } return(res); }
public SystemOfLinearEquation(int m) { if (m <= 0) { throw new ArgumentException(); } equations = new LinearEquation[m]; for (int i = 0; i < m; i++) { equations[i] = new LinearEquation(2); } }
public LinearEquation this[int i] { get { if (i < 0 || i >= equations.Length) { throw new IndexOutOfRangeException(); } return(equations[i]); } set { if (i < 0 || i >= equations.Length) { throw new IndexOutOfRangeException(); } equations[i] = new LinearEquation(value); } }
public LinearEquation(LinearEquation le) { coefficients = le.coefficients; }