Skip to content

python: fix addEdge when adding missing nodes#1232

Merged
fabratu merged 1 commit intonetworkit:masterfrom
PetholzA:feature/20240617_python_fix_addEdge
Jul 1, 2024
Merged

python: fix addEdge when adding missing nodes#1232
fabratu merged 1 commit intonetworkit:masterfrom
PetholzA:feature/20240617_python_fix_addEdge

Conversation

@PetholzA
Copy link
Contributor

@PetholzA PetholzA commented Jun 18, 2024

This PR addresses the issue that addEdge(u,v) in python behaves differently to c++ (and change the corresponding test).

  • Previously when the parameter addMissing has been set to True and either node u or v did not exist in the graph, all not existing nodes from the previous numberOfNodes() to max(u,v) have been added to the graph aswell as u or v.
  • This was not properly documented and furthermore created potentially many unused nodes.

@PetholzA PetholzA force-pushed the feature/20240617_python_fix_addEdge branch from 25c0190 to 055b370 Compare June 24, 2024 09:37
@fabratu fabratu merged commit a526e99 into networkit:master Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants