Open
Conversation
…удет изменён под более распределённый подход с использованием Row, Matrix и LinearEquation.
…дными данными и для записи результата.
swsms
reviewed
Dec 27, 2018
| double matrix[][] = {{1.0, 1.0, 2.0, 9.0}, {2.0, 4.0, -3.0, 1.0}, {3.0, 6.0, -5.0, 0.0}}; | ||
| double result[] = {1.0, 2.0, 3.0}; | ||
| GaussianElimintation gaussianElimintation = new GaussianElimintation(matrix); | ||
| Assert.assertTrue(Arrays.equals(result, gaussianElimintation.getResult())); |
There was a problem hiding this comment.
you may also use static import if you want
| } | ||
|
|
||
| public void add(Row row, double coefficient, int skipFirst) { | ||
| Double[] to = new Double[doubleList.size()], |
There was a problem hiding this comment.
Multi-variables declaration looks not very good here
| out.close(); | ||
| System.out.println("Completed!"); | ||
| } catch (IOException e) { | ||
| e.printStackTrace(); |
There was a problem hiding this comment.
Maybe it is better to use this try-catch more "local" to encapsulate only those code which can really produce IOException
| * Класс для нахлждения вектора решений системы уравнений методом Гаусса | ||
| */ | ||
|
|
||
| public class GaussianElimintation { |
There was a problem hiding this comment.
In general, your code looks very readable! Congratulations!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.