diff --git a/metricscomputer.py b/metricscomputer.py index 25b365f..042e8c0 100644 --- a/metricscomputer.py +++ b/metricscomputer.py @@ -54,43 +54,44 @@ if cr or all: - crossings_val = crossings.count_crossings(G) + crss = crossings.count_crossings(G, ignore_label_edge_cr=True) + crossings_val = len(crss) output_txt += "CR: " + str(crossings_val) + "\n" csv_head_line += "CR;" csv_line += str(crossings_val) + ";" -if ue or all:: +if ue or all: uniedgelen_val = uniedgelen.uniformity_edge_length(G) output_txt += "UE: " + str(uniedgelen_val) + "\n" csv_head_line += "UE;" csv_line += str(uniedgelen_val) + ";" -if st or all:: +if st or all: stress_val = stress.stress(G) output_txt += "ST: " + str(stress_val) + "\n" csv_head_line += "ST;" csv_line += str(stress_val) + ";" -if np or all:: +if np or all: neigpres_val = neigpres.compute_neig_preservation(G) output_txt += "NP: " + str(neigpres_val) + "\n" csv_head_line += "NP;" csv_line += str(neigpres_val) + ";" -if lblbb or all:: +if lblbb or all: labelsBBRatio_val = labelsmeas.labelsBBRatio(G) output_txt += "lblbb: " + str(labelsBBRatio_val) + "\n" csv_head_line += "lblbb;" csv_line += str(labelsBBRatio_val) + ";" -if lblarea or all:: +if lblarea or all: totLabelsArea_val = labelsmeas.totLabelsArea(G) output_txt += "lblarea: " + str(totLabelsArea_val) + "\n" csv_head_line += "lblarea;" csv_line += str(totLabelsArea_val) + ";" -if bb or all:: +if bb or all: bbox_val = othermeas.boundingBox(G) output_txt += "BB: " + str(bbox_val) + "\n" csv_head_line += "BB;"