Comment Feed:
♦ RSS
ClusterCenters[l_, δ_] := Total[#]/Length[#] & /@ Module[{pos},
Fold[(pos = Position[#1, _?(Function[{l2}, Select[l2,
Function[{p}, Norm[#2 - p] ≤ δ^2], 1] ≠ {}]), 1, Heads -> False];
Append[Delete[#1, pos],Append[Flatten[Extract[#1, pos], 1], #2]]) &, {}, l]]