Preprocessor update + corresponding change in parameters derivatives

In the *_params_derivs.m files, in the "hp" matrix, the preprocessor now fully
outputs the symmetric elements, so getH needs to be adapted.

By the way, also clean up code for "rpp" and "gpp", were full symmetric
elements were also already present (and therefore do not need to be duplicated
in getH).
time-shift
Sébastien Villemot 2018-11-22 17:53:39 +01:00
parent 6995e24863
commit efec664667
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
2 changed files with 1 additions and 12 deletions

View File

@ -651,7 +651,6 @@ is=is(find(gpp(is,2)==j));
if ~isempty(is)
g22(sub2ind([n,n],gpp(is,3),gpp(is,4)))=gpp(is,5)';
g22(sub2ind([n,n],gpp(is,4),gpp(is,3)))=gpp(is,5)';
end
return
@ -675,10 +674,8 @@ for is=1:length(gpp)
% indx = find(ic==find(d));
if fsparse
g22(sub2ind([m,n],gpp(is,1),gpp(is,2)),sub2ind([npar,npar],gpp(is,3),gpp(is,4)))=gpp(is,5);
g22(sub2ind([m,n],gpp(is,1),gpp(is,2)),sub2ind([npar,npar],gpp(is,4),gpp(is,3)))=gpp(is,5);
else
g22(gpp(is,1),gpp(is,2),gpp(is,3),gpp(is,4))=gpp(is,5);
g22(gpp(is,1),gpp(is,2),gpp(is,4),gpp(is,3))=gpp(is,5);
end
end
@ -696,7 +693,6 @@ for is=1:length(rpp)
% d(rpp(is,2),rpp(is,3))=1;
% indx = find(ic==find(d));
r22(rpp(is,1),rpp(is,2),rpp(is,3))=rpp(is,4);
r22(rpp(is,1),rpp(is,3),rpp(is,2))=rpp(is,4);
end
return
@ -707,7 +703,6 @@ h2=zeros(r,m,m,npar);
for is=1:length(hp)
h2(hp(is,1),hp(is,2),hp(is,3),hp(is,4))=hp(is,5);
h2(hp(is,1),hp(is,3),hp(is,2),hp(is,4))=hp(is,5);
end
return
@ -722,10 +717,4 @@ if ~isempty(is)
h2(sub2ind([m,npar],hp(is,3),hp(is,4)))=hp(is,5)';
end
is=is1(find(hp(is1,3)==j));
if ~isempty(is)
h2(sub2ind([m,npar],hp(is,2),hp(is,4)))=hp(is,5)';
end
return

@ -1 +1 @@
Subproject commit b524e19cde2e42caa68be41bd573ee76eb6d4cc2
Subproject commit fc9cc2dc503e2c8b0921b320e041b0d5f49057ab