I'm working on a Genetic Algorithm project and need to write a code to do the crossover operation. I need to select a few array and swap the array at a given point. For example, if an array have the values of
A [1][28] = 1110110010011000110110011110
B [1][28] = 0111001111100100001001110011
and the array will be swapped at the 12th column
A [1][28] = 1110110010011||000110110011110
B [1][28] = 0111001111100||100001001110011
The result would be the following array:
A' [1][28] = 1110110010011100001001110011
B' [1][28] = 0111001111100000110110011110
I've been successful in selecting the array but I'm having problem with swapping the array.