%%% Script for benchmarking Mergesort, Quicksort, Bubblesort and Dumbsort

%declaration of important variables
datasize = [26];
%sorted_f; sorted_b; permut;
%time_merge_sorted_f = ones(1, length(datasize));
%time_merge_sorted_b = ones(1, length(datasize));
time_merge_permut = ones(1, length(datasize));

%time_quick_sorted_f = ones(1, length(datasize));
%time_quick_sorted_b = ones(1, length(datasize));
time_quick_permut = ones(1, length(datasize));

%time_bubble_sorted_f = ones(1, length(datasize));
%time_bubble_sorted_b = ones(1, length(datasize));
time_bubble_permut = ones(1, length(datasize));
%time_stamp;

%mergesort
pause on
disp('Mergesort')
for i=1:length(datasize)
    %filling the vectors
    %sorted_f = 1:datasize(i);
    %sorted_b = i:-datasize(1):1;
    permut = randperm(datasize(i));
    
    %%%%%mergesort%%%%%
    y_p = mergesort(permut);
    
    disp(['Mergesort Round ', num2str(datasize(i)), ' finished'])
    
    %%%%%quicksort%%%%%
    %y_p = quicksort(permut);
    
    disp(['Quicksort Round ', num2str(datasize(i)), ' finished'])
    
    %%%%%bubblesort%%%%%
    %y_p = bubblesort(permut);

    disp(['Bubblesort Round ', num2str(datasize(i)), ' finished'])
end
pause off
          