public IActionResult FormJacobiMethod(JacobiMethod jacobiMethod) { if (jacobiMethod.VectorB != null && jacobiMethod.MatrixA != null && jacobiMethod.VectorX != null) { JacobiMethodCPlusPlus jacobiMethodCPP = new JacobiMethodCPlusPlus(); if (jacobiMethodCPP.method(jacobiMethod.MatrixA, jacobiMethod.VectorB, jacobiMethod.VectorX, jacobiMethod.Eps)) { _jacobiMethodCPP.Result = jacobiMethodCPP.getVectorX(); } } return(View(_jacobiMethodCPP)); }
public IActionResult FormJacobiMethod(JacobiMethod jacobiMethod) { if (jacobiMethod.VectorB != null && jacobiMethod.MatrixA != null && jacobiMethod.VectorX != null) { try { JacobiMethodCPlusPlus jacobiMethodCPP = new JacobiMethodCPlusPlus(); if (jacobiMethodCPP.method(jacobiMethod.MatrixA, jacobiMethod.VectorB, jacobiMethod.VectorX, jacobiMethod.Eps)) { _jacobiMethodCPP.Result = jacobiMethodCPP.getVectorX(); } else { _jacobiMethodCPP.Result = "It is not strictly diagonally dominant system of linear equations."; } } catch (Exception) { } } return(View(_jacobiMethodCPP)); }