Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions spotbugs-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@
<Match>
<Bug pattern="UWF_UNWRITTEN_FIELD" />
</Match>
<Match>
<Bug pattern="DLS_DEAD_LOCAL_STORE" />
</Match>
<Match>
<Bug pattern="UWF_NULL_FIELD" />
</Match>
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/com/thealgorithms/maths/Gaussian.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ private Gaussian() {
}

public static ArrayList<Double> gaussian(int matSize, ArrayList<Double> matrix) {
ArrayList<Double> answerArray = new ArrayList<Double>();
int i;
int j = 0;

Expand All @@ -22,8 +21,7 @@ public static ArrayList<Double> gaussian(int matSize, ArrayList<Double> matrix)
}

mat = gaussianElimination(matSize, i, mat);
answerArray = valueOfGaussian(matSize, x, mat);
return answerArray;
return valueOfGaussian(matSize, x, mat);
}

// Perform Gaussian elimination
Expand Down
4 changes: 1 addition & 3 deletions src/test/java/com/thealgorithms/maths/GaussianTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ public class GaussianTest {
@Test
void passTest1() {
ArrayList<Double> list = new ArrayList<Double>();
ArrayList<Double> gaussian = new ArrayList<Double>();
ArrayList<Double> answer = new ArrayList<Double>();
answer.add(0.0);
answer.add(1.0);
Expand All @@ -24,8 +23,7 @@ void passTest1() {
list.add(2.0);
list.add(1.0);
list.add(1.0);
gaussian = gaussian(matrixSize, list);

assertEquals(answer, gaussian);
assertEquals(answer, gaussian(matrixSize, list));
}
}