-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
Helper function to avoid duplicated code when using weights #32723
Milestone
Comments
Branch: public/graphs/32723_weight |
comment:1
As soon as we agree on this method, we will use it in more methods. New commits:
|
Commit: |
dcoudert
changed the title
Helper function for weight functions
Helper function to avoid duplicated code when using weights
Oct 19, 2021
comment:2
LGTM. |
Reviewer: Travis Scrimshaw |
comment:3
Thank you ! |
Changed branch from public/graphs/32723_weight to |
This was referenced Mar 1, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Many functions with parameters
by_weight
andweight_function
have duplicated code for checking the parameters and setting the weight function. Here we add a helper function_get_weight_function
that takes all related parameters as input and return proper values for parameterby_weight
and a valid weight function.A next step will be to unify the usage of weights in graphs, as proposed in #13112, since we use either
use_edge_labels
or the combination ofby_weight
andweight_function
.CC: @tscrim
Component: graph theory
Author: David Coudert
Branch/Commit:
6800b36
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/32723
The text was updated successfully, but these errors were encountered: