calcNeighbors renamed to genNeighbors, parameters are k and scheme