function c = kmeans_initialize ( dim, n, p, k )

%% KMEANS_INITIALIZE randomly chooses K data values for cluster centers.
%
%  Get a random permutation of the integers 1 through N.
%
  perm = randperm ( n );
%
%  Use the first K entries of the permutation to select K 
%  data values to use as cluster centers.
%
  c(1:dim,1:k) = p(1:dim,perm(1:k));

  return
end

  
