GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix model analysis issue · RepGraph/RepGraph@d2757d3

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src/main
    • javascript/repgraphfrontend/src/Components/AnalysisComponents
      • DatasetAnalysisDisplay.js
    • java/com/RepGraph
      • AbstractGraph.java
      • AbstractModel.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/main/java/com/RepGraph/AbstractGraph.java‎

Copy file name to clipboardExpand all lines: src/main/java/com/RepGraph/AbstractGraph.java
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,8 @@ public float getAverageSpanLength(){
10261026
float span = 0;
10271027
if (n.getAnchors()!=null){
10281028
for (Anchors a:n.getAnchors()) {
1029-
span+= a.getEnd()-a.getFrom();
1029+
span+= a.getEnd()-a.getFrom()+1;
1030+
10301031
}
10311032
span/=n.getAnchors().size();
10321033
}
Collapse file

‎src/main/java/com/RepGraph/AbstractModel.java‎

Copy file name to clipboardExpand all lines: src/main/java/com/RepGraph/AbstractModel.java
+5-4Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ public HashMap<String, String> modelAnalysis() throws IOException, InterruptedEx
8484
total_edges += g.getEdges().size();
8585
total_tokens += g.getTokens().size();
8686
total_spans += g.getAverageSpanLength();
87+
8788
if (g.isCyclic(true)){
8889
total_directed_cyclic++;
8990
}
@@ -107,10 +108,10 @@ public HashMap<String, String> modelAnalysis() throws IOException, InterruptedEx
107108
AnalysisInfo.put("Average Number of Nodes",Precision.round(total_nodes/graphs.values().size(),2)+"");
108109
AnalysisInfo.put("Average Number of Edges",Precision.round(total_edges/graphs.values().size(),2)+"");
109110
AnalysisInfo.put("Average Number of Tokens",Precision.round(total_tokens/graphs.values().size(),2)+"");
110-
AnalysisInfo.put("Percentage of Directed Cyclic Graphs",Precision.round((total_directed_cyclic/graphs.values().size())*100,4)+"");
111-
AnalysisInfo.put("Percentage of Undirected Cyclic Graphs",Precision.round((total_undirected_cyclic/graphs.values().size())*100,4)+"");
112-
AnalysisInfo.put("Percentage of Disconnected Graphs",Precision.round((total_not_connected/graphs.values().size())*100,4)+"");
113-
AnalysisInfo.put("Percentage of Planar Graphs",Precision.round((total_planar/graphs.values().size())*100,4)+"");
111+
AnalysisInfo.put("Percentage of Directed Cyclic Graphs",Precision.round((total_directed_cyclic/graphs.values().size())*100,2)+"");
112+
AnalysisInfo.put("Percentage of Undirected Cyclic Graphs",Precision.round((total_undirected_cyclic/graphs.values().size())*100,2)+"");
113+
AnalysisInfo.put("Percentage of Disconnected Graphs",Precision.round((total_not_connected/graphs.values().size())*100,2)+"");
114+
AnalysisInfo.put("Percentage of Planar Graphs",Precision.round((total_planar/graphs.values().size())*100,2)+"");
114115
return AnalysisInfo;
115116
}
116117

Collapse file

‎src/main/javascript/repgraphfrontend/src/Components/AnalysisComponents/DatasetAnalysisDisplay.js‎

Copy file name to clipboardExpand all lines: src/main/javascript/repgraphfrontend/src/Components/AnalysisComponents/DatasetAnalysisDisplay.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export default function DatasetAnalysisFormDisplay(props) {
6060
//Add the rows to the table of results - in consistent order
6161
try {
6262
for (const newRow in response) {
63-
if (newRow.includes("Total")){
63+
if (newRow.includes("Total") || newRow.includes("Average")){
6464
newRows.push(createData(newRow, response[newRow]));
6565
}else{
6666
newRows.push(createData(newRow, response[newRow]+"%"));

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.