public static Vector StartSolver(Matrix inp, Vector right) { Matrix A = new Matrix(inp); Vector F = new Vector(right); DirectWay(A, F); var res = new Vector(F.Size); Substitution.BackRowSubstitution(A, F, res); return(res); }
public static Vector StartModifiedSolverQR(Matrix A, Vector F) { Matrix R = new Matrix(A.Row, A.Column); Matrix Q = new Matrix(A.Row, A.Column); // for (int i = 0; i < A.Row; i++) Q.Elem[i][i] = 1.0; Modified(A, Q, R); Vector y = new Vector(Q.Column); Vector x = new Vector(Q.Column); Q = Q.Transpose(); y = Q * F; Substitution.BackRowSubstitution(R, y, x); return(x); }