mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-27 06:23:08 +08:00
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user