let neighbourhoods =
    (match topology_boundary with Types.Periodic -> periodic | Types.Bounded -> bounded)
      (match neighbourhood_distance with Types.L_one -> lone | Types.L_inf -> linf)