function [result impr] = updateIndividuals(x, Nc, times, F, CR, m, data, LB, UB, strategy, best_idx)
    
    % This function implements the 3 processes (mutation, crossover,
    % selection) of DE method

    % ------------------------------------------------------------------- %
    % Dimensions of Data
    [n_row n_col] = size(x);
    
    % Pick randomly individuals from population.
    indices = randperm(n_row);
    i = indices(1);        % Individual to update.
    b = indices(2);        % Other Individual b.
    c = indices(3);        % Other Individual c.
    d = indices(4);        % Other Individual d.
    e = indices(5);        % Other Individual e.
    if (best_idx == -1)
        best_idx = i;
    end
    
    R = ceil(n_col * rand(1,1));

    y = x(i, :);
    % Copy old Individual as a basis for the new Individuals.
    fitness = calculateFitness(Nc, times, y, data, m);
    
    % Compute new individuals using DE Method
    for j=1:n_col
        if (j==R) || (rand(1,1) < CR)
            switch(strategy)
                case 1
                    % Mutation Strategy: DE\rand\1
                    y(1, j) = x(i,j) + F * (x(b,j) - x(c,j));
                    break;
                case 2
                    % Mutation Strategy: DE\best\1                    
                    y(1, j) = x(best_idx,j) + F * (x(b,j) - x(c,j));
                    break;
                case 3                    
                    % Mutation Strategy: DE\rand\2
                     y(1, j) = x(i,j) + F * (x(b,j) - x(c,j) + x(d,j) - x(e,j));
                    break;
                    % Mutation Strategy: DE\best\2
                case 4
                    y(1, j) = x(best_idx,j) + F * (x(b,j) - x(c,j) + x(d,j) - x(e,j));
                    break;
            end
        end
    end

    % Bound position to search-space.
    y = min(UB, max(LB, y));

    % Compute fitness function
    newFitness = calculateFitness(Nc, times, y, data, m);

    impr = 0;
    % Update Individual if fitness improvement.
    if newFitness < fitness
        % Update individual position.
        x(i,:) = y;
        impr = 1;
%         fprintf('DE Method improved Individual y, from %.8f to %.8f\n', fitness, newFitness);
    end
    result = x;
    % ------------------------------------------------------------------- %

end