pywr / pywr-next

An experimental repository exploring ideas for a major revision to Pywr using Rust as a backend.
6 stars 4 forks source link

refactor: Make ParameterIndex generic #138

Closed jetuk closed 6 months ago

jetuk commented 6 months ago

This removes IndexParameterIndex (awful name!) and MultiValueParameterIndex in favour of a generic ParameterIndex<T>. Where T is the return type of the associated Parameter<T>. This ensures there is stronger type constraints to prevent using the wrong index in the wrong vec of parameters.