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

dasp_graph: Pass edge weights to Node::process #182

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Smona
Copy link

@Smona Smona commented Feb 26, 2024

This PR makes Node and Input generic by edge weight, and passes the edge weight to process on each Input, resolving a TODO in the docs.

This is only implemented for weights that implement Clone, because I could not figure out a good way to store a reference to the weight in the Input structs due to how the processor's inputs field is reused. But I think this will be sufficient for the majority of use cases, where we usually just need to distinguish inputs by simple types.

I think this change is backwards compatible, because the W type parameter used to refer to the weight defaults to (), and I didn't have to make any changes to my (small) project after switching to this branch.

Documentation is also updated.

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

Successfully merging this pull request may close these issues.

1 participant