Skip to content

Conversation

@ChuckHastings
Copy link
Collaborator

So far this just defines the proposed new symmetrization function signatures.

@copy-pr-bot
Copy link

copy-pr-bot bot commented Oct 3, 2025

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@ChuckHastings ChuckHastings added improvement Improvement / enhancement to an existing function DO NOT MERGE Hold off on merging; see PR for details breaking Breaking change labels Oct 3, 2025
@ChuckHastings ChuckHastings self-assigned this Oct 3, 2025
std::optional<rmm::device_uvector<edge_time_t>>&& edgelist_edge_end_times,
bool reciprocal);
std::vector<arithmetic_device_uvector_t>>
add_reciprocal_edges(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this name is confusing.

This sounds like we are adding reciprocal edges to another edge list. But isn't this inspecting the input edge list and keeping only the reciprocal edges?

I think we need a clearer name.

And the function below...

Isn't removing non-reciprocal edges same to the previous symmetrize_edgelist function with reciprocal = true. The comment is saying the opposite.

So, there are two ways to symmetrize.

  1. Only keep the reciprocal edges. Remove all non-reciprocal edges.
  2. Add inverse edges for all non-reciprocal edges.

I think we'd better rename the functions to make this more intuitive...

I asked this to ChatGPT, and these are the names ChatGPT suggested...

make_reciprocal_edges() <= But I think these names are bad... Still confusing.
make_symmetric_edges()

symmetrize_edgelist_union() <= Sounds better... not sure reciprocal & intersection aligns 100%
symmetrize_edgelist_intersection()

keep_reciprocal_edges() <= If I need to pick one out of the three.. I may go with this.
add_inverse_edges()

But there might be better names than this... Just a starting point...

* @brief Rule for combining edge properties when adding reciprocal edges.
*/
enum class edge_property_combining_rule_t {
PART_OF_UNIQUENESS, /// This property is part of the uniqueness of the edge.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah... I am not sure about this... This is not really a combining rule...

And if this is selected for an edge property... how do we consider that in symmetrization.

Say edge ID is selected as "PART_OF_UNIQUENESS" property.

In (src, dst, ID) triplets, how do we symmetrize (3, 5, 1) and (5, 3, 1) with reciprocal = true/false? What about (3, 5, 1) and (5, 3, 2)?

I think we should make this cleaner and better document the expected behavior. Just reading the names, I can't properly guess how these functions will work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Breaking change DO NOT MERGE Hold off on merging; see PR for details improvement Improvement / enhancement to an existing function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants