Format code with prettier (#3375)

This commit is contained in:
acbin
2022-10-03 17:23:00 +08:00
committed by GitHub
parent 32b9b11ed5
commit e96f567bfc
464 changed files with 11483 additions and 6189 deletions

View File

@ -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;
}
}
}