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 other means for handling duplicate edges in remove_multi_edges #4057

Open
Tracked by #3280
ChuckHastings opened this issue Dec 12, 2023 · 0 comments
Open
Tracked by #3280

Comments

@ChuckHastings
Copy link
Collaborator

#4054 adds a mechanism to the remove_multi_edges function to "decide" which edge weight to keep when edge weights are present in the edge list (and potentially different). By default remove_multi_edges will arbitrarily pick them. The PR adds the option to pick the smallest edge weight. This can be important in an undirected graph, since we will store the edge in each direction it some algorithms will be negatively impacted if the weight in one direction is different than the weight in the opposite direction.

But the notion of picking the smallest edge weight is, in itself, an arbitrary choice. We should consider other criteria for modifying the edges. Some reasonable examples,

  1. largest edge weight
  2. sum the edge weights
  3. average the edge weights

Additionally, we're talking about weights, but we support arbitrary edge properties within the cugraph framework (currently we explicitly support edge weight, edge id and edge type for some algorithms).

One could imagine creating a functor that would allow the user to customize exactly how to reduce a list of edges with edge properties to a single edge with edge properties.

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

No branches or pull requests

1 participant