The story goes like this:
I have an abstract class called Algorithms and a lot of classes that extend it. Some of them have parameters to tune. Some have none, and some have up to 5.
I would like to have a method in Algorithms that can tune an arbitrary parameter. e.g.:
public static void tune (String paramName, double minValue, double MaxValue)
{ ... }
So that I can call it like this on 'class SoftRankBoots extends Algorithm':
Algorithm srb = new SoftRankBoost();
srb.tune("delta", 0, 1);
Note that SoftRankBoost has an instance variable 'double delta';
How can I achieve this?
Thank you.
srb.tune("delta", 0, 1)? Does it use some method to choose an optimaldelta? (In which case, how do you want it to work when tuning multiple parameters?)