Skip to content

Commit

Permalink
HTML statistics for connevted sets and graph structures
Browse files Browse the repository at this point in the history
  • Loading branch information
anjeve committed Feb 26, 2015
1 parent 9878d13 commit 43f24e6
Show file tree
Hide file tree
Showing 3 changed files with 211 additions and 134 deletions.
33 changes: 9 additions & 24 deletions src/graphlod/GraphFeatures.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,17 @@ public Set<Set<String>> getBiConnectedSets() {

public boolean containsCycles() {
CycleDetector<String, DefaultEdge> cycleDetector = new CycleDetector<>(this.graph);
return cycleDetector.detectCycles();
this.containsCycle = cycleDetector.detectCycles();
return this.containsCycle;
}

public boolean isBipartite() {
if (GraphTests.isBipartite(this.undirectedG)) {
return true;
}
return false;
}

public boolean isPathGraph() {
if (this.isPathGraph == null) {
double diameter = getDiameterUndirected();
Expand Down Expand Up @@ -197,13 +205,6 @@ public boolean isMixedDirectedStarGraph() {
}

public boolean isCompleteGraph() {
/* for (String v : this.undirectedG.vertexSet()) {
if (this.undirectedG.degreeOf(v) != this.getEdgeCount()-1) {
return false;
}
}
return true; */

if (GraphTests.isComplete(this.undirectedG)) {
return true;
}
Expand All @@ -218,22 +219,6 @@ public boolean isTree() {
}

public boolean isTree(UndirectedGraph<String, DefaultEdge> g, boolean overwriteCheck) {
/*
GraphIterator<String, DefaultEdge> iterator = new TreeDepthFirstIterator(g, this);
while (iterator.hasNext()) {
String v = iterator.next();
if (containsCycle) {
if (overwriteCheck) {
this.isTree = false;
}
return false;
}
}
if (overwriteCheck) {
this.isTree = true;
}
return true;
*/
boolean isTree = GraphTests.isTree(g);
if (isTree) {
if (overwriteCheck) {
Expand Down
Loading

0 comments on commit 43f24e6

Please sign in to comment.