calc_dists_dotprods function

Calculate distances and dot products between two sets of neurons