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.
This PR makes
Node
andInput
generic by edge weight, and passes the edge weight toprocess
on eachInput
, 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 theInput
structs due to how the processor'sinputs
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.