mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-27 06:23:08 +08:00
Format code with prettier (#3375)
This commit is contained in:
@ -4,7 +4,10 @@ import java.util.ArrayList;
|
||||
|
||||
public class Gaussian {
|
||||
|
||||
public static ArrayList<Double> gaussian(int mat_size, ArrayList<Double> matrix) {
|
||||
public static ArrayList<Double> gaussian(
|
||||
int mat_size,
|
||||
ArrayList<Double> matrix
|
||||
) {
|
||||
ArrayList<Double> answerArray = new ArrayList<Double>();
|
||||
int i, j = 0;
|
||||
|
||||
@ -24,7 +27,11 @@ public class Gaussian {
|
||||
}
|
||||
|
||||
// Perform Gaussian elimination
|
||||
public static double[][] gaussianElimination(int mat_size, int i, double[][] mat) {
|
||||
public static double[][] gaussianElimination(
|
||||
int mat_size,
|
||||
int i,
|
||||
double[][] mat
|
||||
) {
|
||||
int step = 0;
|
||||
for (step = 0; step < mat_size - 1; step++) {
|
||||
for (i = step; i < mat_size - 1; i++) {
|
||||
@ -39,7 +46,11 @@ public class Gaussian {
|
||||
}
|
||||
|
||||
// calculate the x_1, x_2,... values of the gaussian and save it in an arraylist.
|
||||
public static ArrayList<Double> valueOfGaussian(int mat_size, double[][] x, double[][] mat) {
|
||||
public static ArrayList<Double> valueOfGaussian(
|
||||
int mat_size,
|
||||
double[][] x,
|
||||
double[][] mat
|
||||
) {
|
||||
ArrayList<Double> answerArray = new ArrayList<Double>();
|
||||
int i, j;
|
||||
|
||||
@ -64,4 +75,4 @@ public class Gaussian {
|
||||
}
|
||||
return answerArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user