function [distances, avgDist, varDist] = tavolsagVaz(X)
  [n, m] = size(X);
  distances = zeros(n, n);
  for k=1:n
    klength = norm(X(k,:), 2); % you might want to rely on this result later on
    for l=k+1:n
      % here comes the code
    end
  end
  distVector = reshape(distances, 1, n^2);
  avgDist = mean(distVector);
  varDist = var(distVector);
end
