Menu

#860 inducedSubGraph inconsistent

3.5.x
closed-works-for-me
nobody
None
5
2017-05-30
2017-05-19
No

When applying inducedSubGraph to a selection containing edges whose end nodes are not both selected.

  • The plugin used through the GUI excludes these edges to compute the inducedSubGraph
  • The plugin used through python includes these edges to compute the inducedSubGraph

Discussion

  • Patrick Mary

    Patrick Mary - 2017-05-19
     
  • Patrick Mary

    Patrick Mary - 2017-05-19

    The inducedSubGraph plugin has a second parameter 'Use edges' whose default value is false, which means that the non selected end nodes of the selected edges are ignored.
    So it seems that your gui/python invokations of this plugin have different values for the 'Use edges' parameter.

     
  • Antoine Lambert

    Antoine Lambert - 2017-05-19

    Hi Guy,

    This is not a bug as by default the 'Induced Sub-Graph' plugin does not take edges into account.
    You have to set the 'Use edges' parameter to true when using it from the GUI.
    You think the behaviour is inconsistent because you are using the 'tlp.Graph.InducedSubGraph(tlp.Graph)' signature in your Python code.
    The first signature is 'tlp.Graph.InducedSubGraph(nodes)' who has the same
    behaviour as the 'Induced Sub-Graph' plugin with default parameters.

    Cheers,

    Antoine

     
  • Patrick Mary

    Patrick Mary - 2017-05-30
    • status: open --> closed-works-for-me
     
  • Patrick Mary

    Patrick Mary - 2017-05-30

    Apparently your python call invokes the inducedSubGraph method of the Graph class, whose behavior differs from the one used by default in the "Induced Sub-Graph" plugin.

     

Log in to post a comment.