%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                        %
%                               converter                                %
%                                                                        %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%FUNKCIA ZABEZPECUJE PREVOD ZADANYCH HODNOT DO NAZVU GRAFU
%Vstupne premenne:
%a - hodnota velkosti dat [int]
%b - oznacenie pouziteho algoritmu [int]
%Vystupne premenne:
%out1 - string hodnoty dat [string]
%out2 - nazov pouziteho algoritmu [string]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [out1,out2] = convert(a,b)
    if a<1000
        str = num2str(a);
        out1 = str;
    elseif a>=1000 && a<1000000
        str = num2str(a/1000);
        out1 = sprintf('%sk',str);
    elseif a>=1000000 && a<1000000000
        str = num2str(a/1000000);
        out1 = sprintf('%sM',str);
    else
        error('CHYBA!!!');
    end
    
    if isequal(b,1)
        out2 = 'SOVA';
    elseif isequal(b,2)
        out2 = 'log-MAP';
    elseif isequal(b,3)
        out2 = 'MAX-log-MAP';
    else
        error('CHYBA!!!');
    end
end