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

[PROPOSAL] Add force parameter to Graph add... functions #208

Open
Grufoony opened this issue Nov 8, 2024 · 0 comments
Open

[PROPOSAL] Add force parameter to Graph add... functions #208

Grufoony opened this issue Nov 8, 2024 · 0 comments
Labels
check required More details required

Comments

@Grufoony
Copy link
Collaborator

Grufoony commented Nov 8, 2024

The way one assing ids for both nodes and streets is not so clear... if you modify a lot your network you have to call many times buildAdj() function and others.
To avoid this we could ask whenever to force the insertion of an element.
For example adding a street may become something like:

void addStreet(const Street<Id, Size>& street, bool bForce = false);

When called with the bForce false, it automatically reassigns the id and does any other operation buildAdj would do.
If called with the "forced" version we can assume the user is telling us "Come on, I know what I'm doing", and keep the current behavior.

What do you think @sbaldu @filippodll?

@Grufoony Grufoony added the check required More details required label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
check required More details required
Projects
None yet
Development

No branches or pull requests

1 participant