function out=Rana(X)

% for the Rosenbrock algorithm. Use Covariance updating matrix 
% use truncated normally distributed random number generator
%start off with a trucated normal sampling and update the truncating at each step
% speed up the maxcut algorithm
%use different number of elite samples to compute the mean adn the covariance of the sample

r=[]; n=size(X,1);
for i=1:size(X,2)-1

    E=X(:,i+1)+ones(n,1);
    r=[E .*cos(sqrt(abs(E-X(:,i)))).*sin(sqrt(abs(E+X(:,i)))) +  X(:,i).* cos(sqrt(abs(E+X(:,i)))).*sin(sqrt(abs(E-X(:,i)))) ,r];
end

out=sum(r,2);
