Change meaning of itterative flag so that it switches between iterative search and exahusitve random search used in R and Matlab versions.