Is it possible to make this program become automatic?

Sorry I don't know how to express it in English, so I use some codes to show what I am trying to say

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
template<typename strategyOne, typename strategyTwo, typename strategyThree>
void someCode(strategyOne stOne, strategyTwo stTwo, strategyThree stThree)
{
 //some codes
 stOne(some args);
 //some codes
 stTwo(some args);
 //some codes
 stThree(some args);
}

int main()
{
 //assume that I have A number of strategies for the strategyOne
 //B number for strategyTwo, C number for strategyThree
 //many jobs of initialization, like
 boost::functional<....> f1 = boost::bind(.....);
 //fx belongs to the family of strategyOne,
 //gx belongs to the family of strategyTwo
 //hx belongs to the family of strategyThree
 
//this loop will test different combinations of all of the strategies
//I declared above
 for(....)
 {
  //fx = f0, f1, f2, and so on
  //gx = g0, g1, g2 and so on
  //hx = h0, h1, h2 and so on
  someCode(fx, gx, hx);
 }
}


I am doing some experiment on what kind of strategies could get
the best result under the certain flow
And I want to pick out the results I like most from the combinations and optimize it(maybe at that time I have to change the flow of the function at all)
How to make this kind of program work?
If there are anything I didn't express it precise and clear, please let me know

Thanks a lot
Last edited on
Topic archived. No new replies allowed.