Mercurial > repos > public > sbplib
annotate +rv/+diffops/addClosuresToDiffOp.m @ 1191:881afc40a3d2 feature/rv
Change to use the interpolation operators in sbplib
| author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
|---|---|
| date | Mon, 29 Jul 2019 16:43:08 +0200 |
| parents | 79618b58b0a0 |
| children |
| rev | line source |
|---|---|
|
1190
79618b58b0a0
Refactor constructDiffops and remove closures from some of the diffops used to compute the residual.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
1163
diff
changeset
|
1 function D = addClosuresToDiffOp(D, closures) |
|
79618b58b0a0
Refactor constructDiffops and remove closures from some of the diffops used to compute the residual.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
1163
diff
changeset
|
2 for i = 1:size(closures,1) |
|
79618b58b0a0
Refactor constructDiffops and remove closures from some of the diffops used to compute the residual.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
1163
diff
changeset
|
3 for j = 1:size(closures,2) |
|
79618b58b0a0
Refactor constructDiffops and remove closures from some of the diffops used to compute the residual.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
1163
diff
changeset
|
4 closure = closures{i,j}; |
|
1163
65a577db5ca0
Move all functions in constructDiffOps to subpackage and refactor
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff
changeset
|
5 if ~isa(closure, 'function_handle') |
|
65a577db5ca0
Move all functions in constructDiffOps to subpackage and refactor
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff
changeset
|
6 closure = @(v) closure*v; |
|
65a577db5ca0
Move all functions in constructDiffOps to subpackage and refactor
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff
changeset
|
7 end |
|
65a577db5ca0
Move all functions in constructDiffOps to subpackage and refactor
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff
changeset
|
8 D = @(v) D(v) + closure(v); |
|
65a577db5ca0
Move all functions in constructDiffOps to subpackage and refactor
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff
changeset
|
9 end |
|
65a577db5ca0
Move all functions in constructDiffOps to subpackage and refactor
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff
changeset
|
10 end |
|
65a577db5ca0
Move all functions in constructDiffOps to subpackage and refactor
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff
changeset
|
11 end |
