Skip to content
This repository was archived by the owner on Jun 18, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Gvisual/src/gvisual/CycleAnalyzer.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import edu.uci.ics.jung.graph.DirectedSparseGraph;
import edu.uci.ics.jung.graph.Graph;
import edu.uci.ics.jung.graph.UndirectedSparseGraph;

import java.util.*;

Expand Down
1 change: 0 additions & 1 deletion Gvisual/src/gvisual/EulerianPathAnalyzer.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package gvisual;

import edu.uci.ics.jung.graph.Graph;
import edu.uci.ics.jung.graph.UndirectedGraph;

import java.util.*;

Expand Down
1 change: 0 additions & 1 deletion Gvisual/src/gvisual/FeedbackVertexSetAnalyzer.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package gvisual;

import edu.uci.ics.jung.graph.Graph;
import edu.uci.ics.jung.graph.UndirectedSparseGraph;
import edu.uci.ics.jung.graph.DirectedSparseGraph;

import java.util.*;
Expand Down
12 changes: 1 addition & 11 deletions Gvisual/src/gvisual/ForceDirectedLayout.java
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ public double computeStress() {
Map<String, Map<String, Integer>> shortestPaths =
new HashMap<String, Map<String, Integer>>();
for (String v : vertexList) {
shortestPaths.put(v, bfsDistances(v));
shortestPaths.put(v, GraphUtils.bfsDistances(graph, v));
}

double stress = 0;
Expand Down Expand Up @@ -762,14 +762,4 @@ private boolean onSegment(double[] p, double[] q, double[] r) {
r[1] <= Math.max(p[1], q[1]) && r[1] >= Math.min(p[1], q[1]);
}

private Map<String, Integer> bfsDistances(String start) {
return GraphUtils.bfsDistances(graph, start);
}

private String escapeXml(String s) {
return s.replace("&", "&amp;")
.replace("<", "&lt;")
.replace(">", "&gt;")
.replace("\"", "&quot;");
}
}
1 change: 0 additions & 1 deletion Gvisual/src/gvisual/GraphAnnotationManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import edu.uci.ics.jung.graph.Graph;
import java.io.*;
import java.util.*;
import java.util.stream.Collectors;

/**
* Manages annotations (notes, tags, colors) on graph nodes and edges
Expand Down
1 change: 0 additions & 1 deletion Gvisual/src/gvisual/GraphCompressor.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import edu.uci.ics.jung.graph.UndirectedSparseGraph;

import java.util.*;
import java.util.stream.Collectors;

/**
* Compresses a graph by merging groups of nodes into supernodes,
Expand Down
1 change: 0 additions & 1 deletion Gvisual/src/gvisual/GraphDistanceDistribution.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import edu.uci.ics.jung.graph.Graph;
import java.util.*;
import java.util.stream.Collectors;

/**
* Analyses the all-pairs shortest-path distance distribution of a graph,
Expand Down
1 change: 0 additions & 1 deletion Gvisual/src/gvisual/GraphMinorAnalyzer.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import edu.uci.ics.jung.graph.Graph;
import edu.uci.ics.jung.graph.UndirectedSparseGraph;
import java.util.*;
import java.util.stream.Collectors;

/**
* Graph Minor Analyzer — operations and analysis based on graph minor theory.
Expand Down
25 changes: 3 additions & 22 deletions Gvisual/src/gvisual/GraphNetworkProfiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ private void computeDiameter(int n) {
Collections.shuffle(vertices, random);
int maxDist = 0;
for (int i = 0; i < samples; i++) {
Map<String, Integer> dist = bfs(vertices.get(i));
Map<String, Integer> dist = GraphUtils.bfsDistances(graph, vertices.get(i));
for (int d : dist.values()) {
if (d > maxDist) maxDist = d;
}
Expand Down Expand Up @@ -276,7 +276,7 @@ private void computeComponents(int n) {
int largestSize = 0;
for (String v : graph.getVertices()) {
if (!visited.contains(v)) {
Map<String, Integer> dist = bfs(v);
Map<String, Integer> dist = GraphUtils.bfsDistances(graph, v);
visited.addAll(dist.keySet());
count++;
if (dist.size() > largestSize) largestSize = dist.size();
Expand All @@ -293,7 +293,7 @@ private void computeAvgPathLength(int n) {
long totalDist = 0;
long pairCount = 0;
for (int i = 0; i < samples; i++) {
Map<String, Integer> dist = bfs(vertices.get(i));
Map<String, Integer> dist = GraphUtils.bfsDistances(graph, vertices.get(i));
for (int d : dist.values()) {
if (d > 0) { totalDist += d; pairCount++; }
}
Expand Down Expand Up @@ -571,25 +571,6 @@ private void setEmptyDefaults() {
overallScore = 0;
}

// ── BFS helper ──────────────────────────────────────────────

private Map<String, Integer> bfs(String source) {
Map<String, Integer> dist = new HashMap<>();
Queue<String> queue = new LinkedList<>();
dist.put(source, 0);
queue.add(source);
while (!queue.isEmpty()) {
String v = queue.poll();
int d = dist.get(v);
for (String neighbor : graph.getNeighbors(v)) {
if (!dist.containsKey(neighbor)) {
dist.put(neighbor, d + 1);
queue.add(neighbor);
}
}
}
return dist;
}

// ── Public getters ──────────────────────────────────────────

Expand Down
1 change: 0 additions & 1 deletion Gvisual/src/gvisual/GraphResilienceAnalyzer.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package gvisual;

import edu.uci.ics.jung.graph.Graph;
import edu.uci.ics.jung.graph.UndirectedSparseGraph;
import java.util.*;

/**
Expand Down
1 change: 0 additions & 1 deletion Gvisual/src/gvisual/GraphSymmetryAnalyzer.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import edu.uci.ics.jung.graph.Graph;
import java.util.*;
import java.util.stream.Collectors;

/**
* Analyses the symmetry structure of a graph by computing automorphism orbits,
Expand Down
1 change: 0 additions & 1 deletion Gvisual/src/gvisual/IndependentSetAnalyzer.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import edu.uci.ics.jung.graph.UndirectedSparseGraph;

import java.util.*;
import java.util.stream.Collectors;

/**
* Independent set analysis for undirected graphs.
Expand Down
2 changes: 0 additions & 2 deletions Gvisual/src/gvisual/SignedGraphAnalyzer.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package gvisual;

import edu.uci.ics.jung.graph.Graph;
import edu.uci.ics.jung.graph.UndirectedSparseGraph;

import java.util.*;
import java.util.stream.Collectors;

/**
* Signed graph analysis based on structural balance theory.
Expand Down
1 change: 0 additions & 1 deletion Gvisual/src/gvisual/SmallWorldAnalyzer.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package gvisual;

import edu.uci.ics.jung.graph.Graph;
import edu.uci.ics.jung.graph.UndirectedSparseGraph;

import java.util.*;

Expand Down
1 change: 0 additions & 1 deletion Gvisual/src/gvisual/SteinerTreeAnalyzer.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package gvisual;

import edu.uci.ics.jung.graph.Graph;
import edu.uci.ics.jung.graph.UndirectedSparseGraph;

import java.util.*;
import java.util.stream.Collectors;
Expand Down
1 change: 0 additions & 1 deletion Gvisual/src/gvisual/SubgraphExtractor.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.stream.Collectors;

/**
* Extracts focused subgraphs from a larger network based on flexible criteria.
Expand Down
1 change: 0 additions & 1 deletion Gvisual/src/gvisual/TemporalGraph.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import edu.uci.ics.jung.graph.Graph;
import edu.uci.ics.jung.graph.UndirectedSparseGraph;
import java.util.*;
import java.util.stream.Collectors;

/**
* A lightweight wrapper around a JUNG graph that provides time-windowed views
Expand Down
2 changes: 0 additions & 2 deletions Gvisual/src/gvisual/TournamentAnalyzer.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package gvisual;

import edu.uci.ics.jung.graph.DirectedSparseGraph;
import edu.uci.ics.jung.graph.Graph;

import java.util.*;
import java.util.stream.Collectors;

/**
* Tournament graph analyzer for directed complete graphs.
Expand Down
1 change: 0 additions & 1 deletion Gvisual/src/gvisual/TreeAnalyzer.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package gvisual;

import edu.uci.ics.jung.graph.Graph;
import edu.uci.ics.jung.graph.UndirectedSparseGraph;

import java.util.*;

Expand Down
1 change: 0 additions & 1 deletion Gvisual/src/gvisual/TreewidthAnalyzer.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package gvisual;

import edu.uci.ics.jung.graph.Graph;
import edu.uci.ics.jung.graph.UndirectedSparseGraph;

import java.util.*;
import java.util.stream.Collectors;
Expand Down
Loading