Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connectivity: compute edges/vertices moves from/to main component #611

Merged
merged 10 commits into from
Sep 30, 2022

Conversation

flo-dup
Copy link
Contributor

@flo-dup flo-dup commented Sep 28, 2022

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Does this PR already have an issue describing the problem ?
Yes, fixes #594

What kind of change does this PR introduce?
Feature

What is the new behavior (if this is a feature change)?
Compute edges/vertices moves from/to main component thanks to following methods:

  • GraphConnectivity::getEdgesAddedToMainComponent
  • GraphConnectivity::getVerticesAddedToMainComponent
  • GraphConnectivity::getVerticesRemovedFromMainComponent
  • GraphConnectivity::getEdgesRemovedFromMainComponent

Other information:
Computing the edges/vertices moves is done by comparing

  • the "small" connected components before the first modification is applied
  • the "small" connected components when the method is called

These comparisons should not be very costly as the small connected components should remain small in most use cases.
Note that some special care was needed because of edges removed then added (or the opposite) during the same temporary changes.

@flo-dup flo-dup changed the title Compute connected deltas Connectivity: compute edges/vertices moves from/to main component Sep 28, 2022
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
flo-dup and others added 3 commits September 29, 2022 13:21
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

98.1% 98.1% Coverage
0.0% 0.0% Duplication

@geofjamg geofjamg merged commit 195928e into main Sep 30, 2022
@geofjamg geofjamg deleted the compute_connected_deltas branch September 30, 2022 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Graph connectivity: get vertices and edges moved to main or small components
2 participants