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

Add option to adjacency matrix functions to adjust parallel edge behavior #413

Closed
mtreinish opened this issue Aug 17, 2021 · 1 comment · Fixed by #899
Closed

Add option to adjacency matrix functions to adjust parallel edge behavior #413

mtreinish opened this issue Aug 17, 2021 · 1 comment · Fixed by #899
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@mtreinish
Copy link
Member

What is the expected enhancement?

Right now the adjacency_matrix() function unconditionally sums the weights for parallel edges in the graph. We should make this configurable so that we can do different operations. Off the top of my head, sum(), min(), max(), avg() are all good candidates.

For maximum flexibility we could just make this a python callback function that get's passed both weights and returns the f64 to use (which is what I think networkx does). However that will have much worse performance than using a f64 operation in rust.

@mtreinish mtreinish added enhancement New feature or request good first issue Good for newcomers labels Aug 17, 2021
@mtreinish mtreinish added this to the 0.11.0 milestone Aug 17, 2021
@mtreinish mtreinish removed this from the 0.11.0 milestone Jan 4, 2022
@danielleodigie
Copy link
Contributor

Can I be assigned to this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
2 participants