replaced function pointers with if tests to check performance.
added safeguard for particle separation distance.
Need to check weather the neighbors are actually solution particles or
not in the allowance function. As is nothing is allowed to connect for
separation > 1.