Too tired to write descriptive message

This commit is contained in:
René Fuhry 2023-05-26 00:39:13 +02:00 committed by GitHub
parent f9f636c6f3
commit bbe304606a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 4 deletions

View File

@ -11,6 +11,16 @@ public class Matrix {
public static void main(String[] args) {}
public Matrix(int rowLength, int columnLength, boolean random) {
if(!random) {
return;
}
matrix = new int[rowLength][columnLength];
this.rowLength = rowLength;
this.columnLength = columnLength;
randomAdjazenzMatrix();
}
public Matrix(String file) {
readCSV(file);
}

View File

@ -1,6 +1,11 @@
public class TestMatrix {
public static void main(String[] args) {
String pathToProgramRoot = "/home/rene/projects/Java/graphprogram";
test1();
test2();
}
public static void test1() {
String pathToProgramRoot = "";
Matrix matrix = new Matrix(pathToProgramRoot + "/csv/graph.csv");
Matrix scalarProduct;
@ -12,8 +17,10 @@ public class TestMatrix {
scalarProduct = matrix.multiply(matrix);
System.out.println("\nScalarProduct A²: \n" + scalarProduct);
Matrix bruh = new Matrix(100, 100);
System.out.println(bruh);
}
public static void test2() {
Matrix bruh = new Matrix(10, 10, true);
System.out.println(bruh);
}
}