style: format code (#4212)

close #4204
This commit is contained in:
acbin
2023-06-09 18:52:05 +08:00
committed by GitHub
parent ad03086f54
commit 00282efd8b
521 changed files with 5233 additions and 7309 deletions

View File

@ -4,10 +4,7 @@ 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;
@ -27,11 +24,7 @@ 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++) {
@ -46,11 +39,7 @@ 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;