PageRenderTime 34ms CodeModel.GetById 25ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/drm/trunk/release/mm/ml/forge_gcalc/gmult.m

http://github.com/zaqwes8811/decoder-reed-solomon
Objective C | 21 lines | 17 code | 4 blank | 0 comment | 3 complexity | d98039acd0391681d9e5ca97914eb9f3 MD5 | raw file
 1% ????????? ????? ??????????? ???????????? ????????? ? ? b - uint_iLen
 2function iMult = gmult(a, b, unicalc)
 3	% ???????????
 4	%index_of = unicalc{1,1};
 5	%alpha_to = unicalc{1,2};
 6	%GF =unicalc{1,3}
 7
 8	if (a == 0) | (b == 0) 
 9		iMult = 0; % ????????? ?? ????
10		return
11	end
12
13	% ????? ?? ????
14    asdf = unicalc{1,1}(a)+unicalc{1,1}(b)-2;
15	iPow = mod(unicalc{1,1}(a)+unicalc{1,1}(b)-2,unicalc{1,3}-1);
16    % ?? ??????? ????
17    iMult = unicalc{1,2}(iPow+1);	% ??????? ?????, ?.?. ????????? ???????? ? 1 ? ???????????? ????? ?? ??????
18
19% not ML	
20% endfunction
21