📄 dirnums.m
字号:
%DIRNUMS calculates the direction numbers
%m=dirnums(poly,k,m)
% for the sobol sequence given
% poly - 1/0 vectors indicating the indices - descending order including leading and following 1
% k - the required number of direction numbers
% m - the initial d direction numbers
function m=dirnums(poly,k,m)
%d=3,a1 =1,a2=0
d=length(poly)-1;
poly=poly(2:end-1);
for i=d+1:k
m(i)=bitxor(2^d*m(i-d),m(i-d)); %last 2 element
for j=1:(d-1)
m(i)=bitxor(2^j*poly(j)*m(i-j),m(i)); %binary or is commutative and associative
end;
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -