improvements

This commit is contained in:
René Fuhry 2023-05-25 23:48:48 +02:00 committed by GitHub
parent 98688a467d
commit 2448464ed4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 42 additions and 2 deletions

View File

@ -1,6 +1,44 @@
public class TestGraph {
public static void main(String[] args) {
Graph g = new Graph("");
test1();
test2();
test3();
test4();
}
static String pathToProgramRoot = "";
/*
* This is a small not connected graph with articulations and bridges
*/
public static void test1() {
Graph g = new Graph(pathToProgramRoot + "/csv/5n.csv");
System.out.println(g);
}
/*
* Bigger graph with bridges and many articulations
*/
public static void test2() {
Graph g = new Graph(pathToProgramRoot + "/csv/24n.csv");
System.out.println(g);
}
/*
* Graph where each vetex is not connected to anything
*/
public static void test3() {
Graph g = new Graph(pathToProgramRoot + "/csv/empty.csv");
System.out.println(g);
}
/*
* small connected graph with one articulation and one bridge
*/
public static void test4() {
Graph g = new Graph(pathToProgramRoot + "/csv/art-brck.csv");
System.out.println(g);
}
}

View File

@ -1,6 +1,8 @@
public class TestMatrix {
public static void main(String[] args) {
Matrix matrix = new Matrix("");
String pathToProgramRoot = "";
Matrix matrix = new Matrix(pathToProgramRoot + "/csv/graph.csv");
Matrix scalarProduct;
System.out.println("RowLength: " + matrix.getRowLength());