new random graph feature #6

Merged
AustrianToast merged 9 commits from dev into main 2023-05-26 12:41:13 +02:00
2 changed files with 42 additions and 2 deletions
Showing only changes of commit 2448464ed4 - Show all commits

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());