Templated the findCoherentNeighbors() function.