I have the following issue:
I have designed a framework that uses a generic delegate function (Func<...>) to calculate distance between two real number vectors
The delegate has the following form:
Func<double[], double[], double> distance;
I have many different distance functions implemented
I would rather not change the signature of distance delegate
I need to create a new function that besides two double vectors needs some additional parameters i.e.
Func<double[], double[], double, double, double> newDistance;
This does not have to be the delegate. What I want is to define a method with additional parameters and pass it to the old interface.
can this and how, be achieved without a serious redesign and without changing the signature of distance delegate?
Regards, Sebastian