Menu

#884 inducedSubgraph method adding nodes multiple times ?

3.5.x
closed-fixed
nobody
None
5
2023-06-07
2023-06-02
No

Here is a bug I experienced while writing python scripts, I was able to repeat with the online python interpreter. Here in its minimal form:
Take a graph (here I am using an graph imported from the Wang et. al. import plugin), manually select two incident edges from it (edges share a node). Invoke the inducedSubgraph method.

graph.inducedSubGraph(graph['viewSelection'])

The resulting subgraph then contains more than 3 nodes and more than 3 edges (although the result may vary) . Selecting more (incident) edges gets you even freakier results.

Any idea what's going on? Thanks to the experts.

Discussion

  • Patrick Mary

    Patrick Mary - 2023-06-02

    My bad.
    This is due to an old optim replacing a set by a vector.
    It will be fixed soon.

     
  • Patrick Mary

    Patrick Mary - 2023-06-07
    • status: open --> closed-fixed
     
  • Patrick Mary

    Patrick Mary - 2023-06-07

    Finally, the error was not in the inducedSubGraph optimized code,
    which was perfectly legitimate, but it revealed a problem in a much older code.

     
  • Melançon Guy

    Melançon Guy - 2023-06-07

    I'm happy I could help renovate Tulip's dusty and deeper layers ... :-)

     

Log in to post a comment.