I am writing a genetic algorithm in R and need to improve the speed of the component functions as much as possible. Therefore, I have re-written some of these functions in C++ w