Should the API here take a weights ParameterVector rather than an index i?  The former option can emulate the latter via "pass a unit weights vector", the latter can only emulate the former via "call it a bunch of times, scale and add to a separate matrix each time, then swap matrices", which is more expensive.  On the other hand, the single-index case is probably the common case.