Skip to content

Conversation

@Jnster
Copy link

@Jnster Jnster commented Dec 15, 2018

No description provided.

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()));
Copy link

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()],
Copy link

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();
Copy link

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 {
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants