public Tuple <IIndividual, IIndividual> crossover(IIndividual partner) { IIndividual child1 = new IndividualExample(this.x + ((IndividualExample)partner).x); IIndividual child2 = new IndividualExample(this.x - ((IndividualExample)partner).x); return(new Tuple <IIndividual, IIndividual>(child1, child2)); }
public Tuple<IIndividual, IIndividual> crossover(IIndividual partner) { IIndividual child1 = new IndividualExample(this.x+((IndividualExample)partner).x); IIndividual child2 = new IndividualExample(this.x-((IndividualExample)partner).x); return new Tuple<IIndividual,IIndividual>(child1,child2); }