add D(:,nonempties) = distfun(X, C(nonempties,:), distance, iter)