function centdist = alldist ( centers )

%*****************************************************************************80
%
%% alldist() computes the matrix of all pairwise distances.
%
%  Input: 
%
%    real CENTERS(): the data points.
%
%  Output:
%
%    real CENTDIST(): matrix of all pairwise distances.
%
  k = size(centers,1);
  centdist = zeros(k,k);
  for j = 1 : k
    centdist(1:j-1,j) = calcdist(centers(1:j-1,:),centers(j,:));
  end
  centdist = centdist + centdist';

  return
end

