-
Notifications
You must be signed in to change notification settings - Fork 12
My realization #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…удет изменён под более распределённый подход с использованием Row, Matrix и LinearEquation.
…дными данными и для записи результата.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, your code looks very readable! Congratulations!
No description provided.