Skip to content

Commit

Permalink
adding ve degrees
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali Rostami committed Apr 17, 2022
1 parent 4490636 commit 9ab687d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/graphtea/extensions/reports/topological/Irr/Irr_G.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ public static int deg_e(GraphModel g, Vertex u) {
return ret - conn;
}

public static Vector<Integer> list_deg_e(GraphModel g) {
Vector<Integer> ret = new Vector<>();
for(Vertex v : g) {
ret.add(deg_e(g, v));
}
return ret;
}

public static int irr_ev_G(GraphModel graph) {
int sum = 0;
for (Vertex i : graph) {
Expand Down Expand Up @@ -79,6 +87,7 @@ public RenderTable calculate(GraphModel g) {
titles.add(" t ");
titles.add(" ve-Irr(G) ");
titles.add(" V. Degrees ");
titles.add("ve Degrees");

ret.setTitles(titles);

Expand Down Expand Up @@ -174,8 +183,10 @@ public RenderTable calculate(GraphModel g) {
v.add(t);
v.add(irr_ev_g);
v.add(al.toString());
v.add(list_deg_e(g));

ret.add(v);

return ret;
}

Expand Down
2 changes: 2 additions & 0 deletions src/graphtea/extensions/reports/topological/Irr/Irr_t_G.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public RenderTable calculate(GraphModel g) {
titles.add(" t ");
titles.add(" Total-ev-Irr(G) ");
titles.add(" V. Degrees ");
titles.add("ve Degrees");

ret.setTitles(titles);

Expand Down Expand Up @@ -172,6 +173,7 @@ public RenderTable calculate(GraphModel g) {
v.add(t);
v.add(irr_t_ev_g);
v.add(al.toString());
v.add(Irr_G.list_deg_e(g));

ret.add(v);
return ret;
Expand Down

0 comments on commit 9ab687d

Please sign in to comment.