From e49f7569f88d08ba890e7d3f399947695a21fb8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Fuhry?= Date: Thu, 25 May 2023 23:43:44 +0200 Subject: [PATCH 1/9] new folder with csv --- csv/graph.csv | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 csv/graph.csv diff --git a/csv/graph.csv b/csv/graph.csv new file mode 100644 index 0000000..9ed6b1a --- /dev/null +++ b/csv/graph.csv @@ -0,0 +1,5 @@ +0;0;1;0;0 +0;0;1;0;0 +1;1;0;1;1 +0;0;1;0;1 +0;0;1;1;0 -- 2.47.2 From 98688a467dbe93e4099ee75d92b1145e7ce7f3b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Fuhry?= Date: Thu, 25 May 2023 23:44:12 +0200 Subject: [PATCH 2/9] more files --- csv/24n.csv | 24 ++++++++++++++++++++++++ csv/5n.csv | 7 +++++++ csv/art-brck.csv | 5 +++++ csv/empty.csv | 5 +++++ 4 files changed, 41 insertions(+) create mode 100644 csv/24n.csv create mode 100644 csv/5n.csv create mode 100644 csv/art-brck.csv create mode 100644 csv/empty.csv diff --git a/csv/24n.csv b/csv/24n.csv new file mode 100644 index 0000000..e02f5d3 --- /dev/null +++ b/csv/24n.csv @@ -0,0 +1,24 @@ +0;1;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0 +1;0;1;1;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0 +0;1;0;1;1;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0 +0;1;1;0;1;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0 +0;0;1;1;0;1;1;1;1;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0 +0;0;0;0;1;0;1;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0 +0;0;0;0;1;1;0;0;0;0;0;1;0;0;0;0;0;0;0;0;0;0;0;0 +0;0;0;0;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csv/art-brck.csv b/csv/art-brck.csv new file mode 100644 index 0000000..4863ae8 --- /dev/null +++ b/csv/art-brck.csv @@ -0,0 +1,5 @@ +0;0;1;1;0 +0;0;1;1;0 +1;1;0;1;0 +1;1;1;0;1 +0;0;0;1;0 \ No newline at end of file diff --git a/csv/empty.csv b/csv/empty.csv new file mode 100644 index 0000000..398c1d8 --- /dev/null +++ b/csv/empty.csv @@ -0,0 +1,5 @@ +0;0;0;0;0 +0;0;0;0;0 +0;0;0;0;0 +0;0;0;0;0 +0;0;0;0;0 \ No newline at end of file -- 2.47.2 From 2448464ed4c288494330dd99c0d607b800f6390b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Fuhry?= Date: Thu, 25 May 2023 23:48:48 +0200 Subject: [PATCH 3/9] improvements --- src/TestGraph.java | 40 +++++++++++++++++++++++++++++++++++++++- src/TestMatrix.java | 4 +++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/src/TestGraph.java b/src/TestGraph.java index 0fa9a36..d05dbf0 100644 --- a/src/TestGraph.java +++ b/src/TestGraph.java @@ -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); } } \ No newline at end of file diff --git a/src/TestMatrix.java b/src/TestMatrix.java index b8a244d..54c2ad3 100644 --- a/src/TestMatrix.java +++ b/src/TestMatrix.java @@ -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()); -- 2.47.2 From 2de0ac5a029d1bbb812682e013d2d695e3f554cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Fuhry?= Date: Fri, 26 May 2023 00:14:44 +0200 Subject: [PATCH 4/9] new method --- src/Matrix.java | 14 ++++++++++++++ src/TestMatrix.java | 5 ++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/Matrix.java b/src/Matrix.java index c62b760..86fd612 100644 --- a/src/Matrix.java +++ b/src/Matrix.java @@ -1,5 +1,6 @@ import java.io.BufferedReader; import java.io.IOException; +import java.util.Random; import java.io.FileReader; import java.io.FileNotFoundException; @@ -18,6 +19,7 @@ public class Matrix { matrix = new int[rowLength][columnLength]; this.rowLength = rowLength; this.columnLength = columnLength; + randomAdjazenzMatrix(); } public Matrix(int[][] matrix) { @@ -79,6 +81,18 @@ public class Matrix { } } + public void randomAdjazenzMatrix() { + Random r = new Random(); + for(int columnIndex=0; columnIndex < columnLength; columnIndex++) { + for(int rowIndex=0; rowIndex < rowLength; rowIndex++) { + if(rowIndex == columnIndex) { + continue; + } + matrix[rowIndex][columnIndex] = r.nextInt(2); + } + } + } + public String toString() { String s = ""; for(int columnIndex=0; columnIndex < columnLength; columnIndex++) { diff --git a/src/TestMatrix.java b/src/TestMatrix.java index 54c2ad3..7e8b04a 100644 --- a/src/TestMatrix.java +++ b/src/TestMatrix.java @@ -1,6 +1,6 @@ public class TestMatrix { public static void main(String[] args) { - String pathToProgramRoot = ""; + String pathToProgramRoot = "/home/rene/projects/Java/graphprogram"; Matrix matrix = new Matrix(pathToProgramRoot + "/csv/graph.csv"); Matrix scalarProduct; @@ -12,5 +12,8 @@ public class TestMatrix { scalarProduct = matrix.multiply(matrix); System.out.println("\nScalarProduct A²: \n" + scalarProduct); + + Matrix bruh = new Matrix(100, 100); + System.out.println(bruh); } } -- 2.47.2 From 41680b38937f71c0ebf6a1e8a9c99b80735b1298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Fuhry?= Date: Fri, 26 May 2023 00:18:40 +0200 Subject: [PATCH 5/9] quick fix --- src/Graph.java | 9 +++++++-- src/Matrix.java | 6 ++++-- src/TestMatrix.java | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/Graph.java b/src/Graph.java index fef94a6..83117f9 100644 --- a/src/Graph.java +++ b/src/Graph.java @@ -17,6 +17,11 @@ public class Graph { public static void main(String[] args) {} + public Graph(int rowLength, int columnLength) { + + + } + public Graph(String file) { adjazenzMatrix = new Matrix(file); calculateDistanzMatrix(); @@ -29,7 +34,7 @@ public class Graph { } public void calculateDistanzMatrix() { - distanzMatrix = new Matrix(adjazenzMatrix.getRowLength(), adjazenzMatrix.getColumnLength()); + distanzMatrix = new Matrix(adjazenzMatrix.getRowLength(), adjazenzMatrix.getColumnLength(), false); Matrix potenzMatrix = adjazenzMatrix; for(int columnIndex=0; columnIndex < distanzMatrix.getColumnLength(); columnIndex++) { @@ -58,7 +63,7 @@ public class Graph { } public void calculateWegMatrix() { - wegMatrix = new Matrix(adjazenzMatrix.getRowLength(), adjazenzMatrix.getColumnLength()); + wegMatrix = new Matrix(adjazenzMatrix.getRowLength(), adjazenzMatrix.getColumnLength(), false); Matrix potenzMatrix = adjazenzMatrix; for(int columnIndex=0; columnIndex < wegMatrix.getColumnLength(); columnIndex++) { diff --git a/src/Matrix.java b/src/Matrix.java index 86fd612..5216579 100644 --- a/src/Matrix.java +++ b/src/Matrix.java @@ -15,11 +15,13 @@ public class Matrix { readCSV(file); } - public Matrix(int rowLength, int columnLength) { + public Matrix(int rowLength, int columnLength, boolean random) { matrix = new int[rowLength][columnLength]; this.rowLength = rowLength; this.columnLength = columnLength; - randomAdjazenzMatrix(); + if(random) { + randomAdjazenzMatrix(); + } } public Matrix(int[][] matrix) { diff --git a/src/TestMatrix.java b/src/TestMatrix.java index 7e8b04a..fef242a 100644 --- a/src/TestMatrix.java +++ b/src/TestMatrix.java @@ -13,7 +13,7 @@ public class TestMatrix { scalarProduct = matrix.multiply(matrix); System.out.println("\nScalarProduct A²: \n" + scalarProduct); - Matrix bruh = new Matrix(100, 100); + Matrix bruh = new Matrix(100, 100, true); System.out.println(bruh); } } -- 2.47.2 From f9f636c6f3de4765cacb0df07e130e60f118ba7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Fuhry?= Date: Fri, 26 May 2023 00:28:55 +0200 Subject: [PATCH 6/9] revert --- src/Graph.java | 9 ++------- src/Matrix.java | 17 +++++++++++++---- src/TestMatrix.java | 2 +- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/Graph.java b/src/Graph.java index 83117f9..fef94a6 100644 --- a/src/Graph.java +++ b/src/Graph.java @@ -17,11 +17,6 @@ public class Graph { public static void main(String[] args) {} - public Graph(int rowLength, int columnLength) { - - - } - public Graph(String file) { adjazenzMatrix = new Matrix(file); calculateDistanzMatrix(); @@ -34,7 +29,7 @@ public class Graph { } public void calculateDistanzMatrix() { - distanzMatrix = new Matrix(adjazenzMatrix.getRowLength(), adjazenzMatrix.getColumnLength(), false); + distanzMatrix = new Matrix(adjazenzMatrix.getRowLength(), adjazenzMatrix.getColumnLength()); Matrix potenzMatrix = adjazenzMatrix; for(int columnIndex=0; columnIndex < distanzMatrix.getColumnLength(); columnIndex++) { @@ -63,7 +58,7 @@ public class Graph { } public void calculateWegMatrix() { - wegMatrix = new Matrix(adjazenzMatrix.getRowLength(), adjazenzMatrix.getColumnLength(), false); + wegMatrix = new Matrix(adjazenzMatrix.getRowLength(), adjazenzMatrix.getColumnLength()); Matrix potenzMatrix = adjazenzMatrix; for(int columnIndex=0; columnIndex < wegMatrix.getColumnLength(); columnIndex++) { diff --git a/src/Matrix.java b/src/Matrix.java index 5216579..9104cf8 100644 --- a/src/Matrix.java +++ b/src/Matrix.java @@ -15,13 +15,10 @@ public class Matrix { readCSV(file); } - public Matrix(int rowLength, int columnLength, boolean random) { + public Matrix(int rowLength, int columnLength) { matrix = new int[rowLength][columnLength]; this.rowLength = rowLength; this.columnLength = columnLength; - if(random) { - randomAdjazenzMatrix(); - } } public Matrix(int[][] matrix) { @@ -83,6 +80,18 @@ public class Matrix { } } + public int[][] clone() { + int[][] clone = new int[rowLength][columnLength]; + + for(int columnIndex=0; columnIndex < columnLength; columnIndex++) { + for(int rowIndex=0; rowIndex < rowLength; rowIndex++) { + clone[rowIndex][columnIndex] = matrix[rowIndex][columnIndex]; + } + } + + return clone; + } + public void randomAdjazenzMatrix() { Random r = new Random(); for(int columnIndex=0; columnIndex < columnLength; columnIndex++) { diff --git a/src/TestMatrix.java b/src/TestMatrix.java index fef242a..7e8b04a 100644 --- a/src/TestMatrix.java +++ b/src/TestMatrix.java @@ -13,7 +13,7 @@ public class TestMatrix { scalarProduct = matrix.multiply(matrix); System.out.println("\nScalarProduct A²: \n" + scalarProduct); - Matrix bruh = new Matrix(100, 100, true); + Matrix bruh = new Matrix(100, 100); System.out.println(bruh); } } -- 2.47.2 From bbe304606aa4a6dfcf5806f143ea158822e89517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Fuhry?= Date: Fri, 26 May 2023 00:39:13 +0200 Subject: [PATCH 7/9] Too tired to write descriptive message --- src/Matrix.java | 10 ++++++++++ src/TestMatrix.java | 15 +++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/Matrix.java b/src/Matrix.java index 9104cf8..c79aed9 100644 --- a/src/Matrix.java +++ b/src/Matrix.java @@ -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); } diff --git a/src/TestMatrix.java b/src/TestMatrix.java index 7e8b04a..210da69 100644 --- a/src/TestMatrix.java +++ b/src/TestMatrix.java @@ -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); + } } -- 2.47.2 From 3b4a6f74b678b6e0e45085f50fff117ae795146e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Fuhry?= Date: Fri, 26 May 2023 12:39:54 +0200 Subject: [PATCH 8/9] can now create random graphs --- src/Graph.java | 2 +- src/Matrix.java | 24 ++++++++++++++++++++++++ src/TestGraph.java | 19 ++++++++++++++----- src/TestMatrix.java | 14 ++++++++++---- 4 files changed, 49 insertions(+), 10 deletions(-) diff --git a/src/Graph.java b/src/Graph.java index fef94a6..e71ff6d 100644 --- a/src/Graph.java +++ b/src/Graph.java @@ -86,6 +86,7 @@ public class Graph { public void calculateExzentrizitäten() { exzentrizitäten = new ArrayList<>(1); + connected = true; for(int rowIndex = 0; rowIndex < distanzMatrix.getRowLength(); rowIndex++) { int exzentrizität = 0; @@ -110,7 +111,6 @@ public class Graph { radius = Integer.MAX_VALUE; diameter = -1; - connected = true; centre = new ArrayList<>(1); for(int rowIndex = 0; rowIndex < exzentrizitäten.size(); rowIndex++) { diff --git a/src/Matrix.java b/src/Matrix.java index c79aed9..d891d09 100644 --- a/src/Matrix.java +++ b/src/Matrix.java @@ -3,6 +3,8 @@ import java.io.IOException; import java.util.Random; import java.io.FileReader; import java.io.FileNotFoundException; +import java.io.BufferedWriter; +import java.io.FileWriter; public class Matrix { private int[][] matrix; @@ -13,6 +15,9 @@ public class Matrix { public Matrix(int rowLength, int columnLength, boolean random) { if(!random) { + matrix = new int[rowLength][columnLength]; + this.rowLength = rowLength; + this.columnLength = columnLength; return; } matrix = new int[rowLength][columnLength]; @@ -114,6 +119,25 @@ public class Matrix { } } + public void WriteToCsv(String filename) { + String s = ""; + + try (BufferedWriter bw = new BufferedWriter(new FileWriter(filename))) { + for(int columnIndex=0; columnIndex < columnLength; columnIndex++) { + s = ""; + for(int rowIndex=0; rowIndex < rowLength; rowIndex++) { + s += matrix[columnIndex][rowIndex]; + if(rowIndex < rowLength - 1) { + s += ";"; + } + } + bw.write(s + "\n"); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + public String toString() { String s = ""; for(int columnIndex=0; columnIndex < columnLength; columnIndex++) { diff --git a/src/TestGraph.java b/src/TestGraph.java index d05dbf0..8d295b4 100644 --- a/src/TestGraph.java +++ b/src/TestGraph.java @@ -1,12 +1,13 @@ public class TestGraph { public static void main(String[] args) { - test1(); - test2(); - test3(); - test4(); + // test1(); + // test2(); + // test3(); + // test4(); + test5(); } - static String pathToProgramRoot = ""; + static String pathToProgramRoot = "/home/rene/projects/Java/graphprogram"; /* @@ -41,4 +42,12 @@ public class TestGraph { Graph g = new Graph(pathToProgramRoot + "/csv/art-brck.csv"); System.out.println(g); } + + /* + * randomly generated graph with x nodes + */ + public static void test5() { + Graph g = new Graph(pathToProgramRoot + "/csv/50n.csv"); + System.out.println(g); + } } \ No newline at end of file diff --git a/src/TestMatrix.java b/src/TestMatrix.java index 210da69..c714b6d 100644 --- a/src/TestMatrix.java +++ b/src/TestMatrix.java @@ -1,11 +1,12 @@ public class TestMatrix { public static void main(String[] args) { - test1(); - test2(); + // test1(); + // test2(); + createCsv(); } public static void test1() { - String pathToProgramRoot = ""; + String pathToProgramRoot = "/home/rene/projects/grpahprogram"; Matrix matrix = new Matrix(pathToProgramRoot + "/csv/graph.csv"); Matrix scalarProduct; @@ -22,5 +23,10 @@ public class TestMatrix { public static void test2() { Matrix bruh = new Matrix(10, 10, true); System.out.println(bruh); - } + } + + public static void createCsv() { + Matrix bruh = new Matrix(50, 50, true); + bruh.WriteToCsv("csv/50n.csv"); + } } -- 2.47.2 From e6c365aecfbd4d41c1d7910efffeb6e108e298cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Fuhry?= Date: Fri, 26 May 2023 12:40:26 +0200 Subject: [PATCH 9/9] random graph with 50 nodes --- csv/50n.csv | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 csv/50n.csv diff --git a/csv/50n.csv b/csv/50n.csv new file mode 100644 index 0000000..2634b24 --- /dev/null +++ b/csv/50n.csv @@ -0,0 +1,50 @@ +0;1;1;0;0;0;0;1;0;1;0;1;0;0;1;1;1;1;0;1;1;1;1;1;0;1;0;0;1;1;0;1;0;1;0;0;0;1;1;0;1;0;0;1;0;0;0;0;0;0 +0;0;1;0;1;0;0;1;1;1;0;1;1;0;1;1;0;0;1;0;1;0;1;0;0;0;1;0;0;1;0;1;1;0;0;0;1;0;0;0;1;0;1;0;1;0;1;0;1;1 +1;0;0;1;0;0;0;1;0;1;1;1;1;0;0;1;0;1;1;1;0;1;1;1;1;0;0;1;1;1;1;1;1;0;0;1;0;0;1;1;0;1;0;0;1;0;0;0;1;0 +1;1;1;0;0;0;1;1;0;1;1;1;1;1;0;1;1;0;1;1;0;0;0;1;1;0;1;1;1;0;0;0;0;0;0;1;1;1;0;0;1;0;0;1;0;0;1;0;0;0 +1;0;1;0;0;0;1;0;1;1;0;1;0;1;0;1;0;0;0;1;1;1;1;1;1;0;0;1;1;1;1;1;0;0;0;1;1;1;1;1;1;0;1;1;0;0;0;0;1;1 +0;0;0;1;1;0;1;1;0;1;0;1;1;1;0;1;0;1;1;1;0;1;0;0;1;1;0;1;1;0;0;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