function [ulmetric,ctmetric] = trial_atreedec(prox,constant,imax,jmax)


n = size(prox,1);

ctmetric = zeros(n,1);
ulmetric = zeros(n,n);
check = zeros(n,n);



for i = 1:n
   
   ctmetric(i) = max([prox(i,imax) prox(i,jmax)]) - (constant);
   
end



for i = 1:n
   for j = 1:n
      
      if(i ~= j)
         
         ulmetric(i,j) = prox(i,j) - ctmetric(i) - ctmetric(j);
         
      else
         
         ulmetric(i,j) = 0.0;
         
      end
      
   end
end

for i = 1:n
    for j = 1:n
        
        if(i ~= j)
            
            check(i,j) = ulmetric(i,j) + ctmetric(i) + ctmetric(j);
            
        end
    end
end

check

prox

