dasp icon indicating copy to clipboard operation
dasp copied to clipboard

dasp_graph: Pass edge weights to Node::process

Open Smona opened this issue 1 year ago • 1 comments

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.

Smona avatar Feb 26 '24 06:02 Smona

@est31 i noticed you've merged a couple of PRs since I put this up, any appetite for merging this? This feature is pretty important for supporting e.g. sidechain inputs.

Smona avatar Feb 10 '25 17:02 Smona