Now we need aÂ set of delegates to make our generic class customaizable according to our needs:
[code lang=”cpp”]
//BulkCrosser -Â to cross individs in a colony
Â public delegate object BulkCrosser(object obj);
//Sorter – to sortÂ individs starting from the best
Â public delegate object Sorter(object obj);
//Optimizer – to optimize a particular individ
Â public delegate object Optimizer(object obj);
//Mutator – to mutate a particular individ or a colony
Â public delegate object Mutator(object obj);
//Crosser – to cross two given individs or sets of individs or colonies, whatever
Â public delegate object Crosser(object obj1,object obj2);
[/code]