-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
Meta-ticket: Unify the use of weights in graphs #13112
Comments
comment:1
Moreover, there are arguments named "by_weight" in distance, shortest_path, shortest_path_length… |
comment:3
I would go for single argument "by_weight" with following semantics of its values:
I think this would be easy to remember. On the other side, it is quite a radical change that would require long transition period. What do you think? |
comment:8
I'm turning this ticket to a task since it requires a long transition period. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:16
Help is more than welcome for reviewing the open tickets listed in this meta-ticket. |
Consider the following example:
In the last two lines, the functions are called differently, which is annoying, since one always has to look up the doc, to find out, which one is the correct.
Since both ways of calling are good (
use_edge_labels
simple and easy,weight_function
more flexible), either should be possible for each function.A first step is to unify the use of parameters
by_weight
,weight_function
andcheck_weight
generic_graph.py
- part 1generic_graph.py
- part 2generic_graph.py
- part 3graph.py
digraph.py
path_enumeration.pyx
spanning_tree.pyx
. Methodrandom_spanning_tree
in random_spanning_tree ignores weights #30566.c_graph.pyx
- depends on other ticketsboost_graph.pyx
- depends on other ticketsWe also have to deprecate
use_edge_labels
and use insteadby_weight
, etc.and check methods silently using
if self.weighted()
distance_graph
- requires to add parametersby_weights
, ...CC: @sagetrac-brunellus @fchapoton @tscrim
Component: graph theory
Keywords: weight graph
Issue created by migration from https://trac.sagemath.org/ticket/13112
The text was updated successfully, but these errors were encountered: