public System_of_Linear_Equation(int n) { sle = new Linear_Equation[n]; for (int i = 0; i < CountX; i++) { sle[i] = new Linear_Equation(n); } }
public static Linear_Equation operator -(Linear_Equation a) { Linear_Equation result = new Linear_Equation(a.CountX); for (int i = 0; i <= result.CountX; i++) { result[i] = -a[i]; } return(result); }
public static Linear_Equation operator /(double r, Linear_Equation a) { Linear_Equation result = new Linear_Equation(a.CountX); for (int i = 0; i <= result.CountX; i++) { result[i] = a[i] / r; } return(result); }
public static Linear_Equation operator +(Linear_Equation a, Linear_Equation b) { Linear_Equation result = new Linear_Equation(a.CountX); for (int i = 0; i <= result.CountX; i++) { double c = a[i] + b[i]; result[i] = Math.Abs(c) < 0.0001 ? 0 : c; } return(result); }