Menu

#881 Eccentricity Plugin returns -1 diameter when selecting unnormalized values

3.5.x
closed-fixed
nobody
None
5
2023-05-31
2022-09-18
No

The Eccentricity plugin returns the graph diameter as a by-product of computing the nodes maximum distances to all other nodes, shown as part of the plugin's parameter dialog. This is a nice feature, and I believe other plugins behave similarly.

By definition, the diameter corresponds to an integer value (as graph distances between nodes all have integer values). The diameter correctly shows when selecting eccentricity to be normalized (normalized = true). Unfortunately, the diameter shows -1 when selecting normalized = false ... I expected the diameter to show the same value whatever the value of the normalized parameter.

Discussion

  • Patrick Mary

    Patrick Mary - 2022-09-26

    The graph diameter computation corresponds to the search for the eccentricity max value. This search is necessary in the normalized = true case; but it is not and is therefore avoided in the normalized = false case.
    In this last case, if the call to the 'Eccentricity' plugin is done via python, the diameter of the graph can then be obtained by a call to getNodeMax() method on the metric.

    Nevertheless, I will code a new version, using the "graph diameter" parameter as an input parameter to force, when its value is set to 1, the diameter computation in the non normalized case.

     

    Last edit: Patrick Mary 2022-09-26
  • Patrick Mary

    Patrick Mary - 2023-05-31
    • status: open --> closed-fixed
     
  • Patrick Mary

    Patrick Mary - 2023-05-31

    Fixed in Tulip 5.7

     

Log in to post a comment.