📄 multilinear2ad.m
字号:
function ytayl2 = multilinear2AD(func,q1,q2,x0,p1,n) %----------------------------------------------------% This file computes B^(n)*q1*q2 using automatic differentiation, where %B^(n) is the second order derivatives of map f^(n). %---------------------------------------------------- taylorder=2; if q1==q2 y1=Bvv(func,x0,q1,p1,taylorder,n); else y11=Bvv(func,x0,q1+q2,p1,taylorder,n); y12=Bvv(func,x0,q1-q2,p1,taylorder,n); y1=1/4.0*(y11-y12); endytayl2=2*tcs(y1);%--------------------------------------------------function y1 = Bvv(mapsf,x0,hc,p1,taylorder,n) % Convert to "active" variables: s = adtayl(0,taylorder);%Base point & Taylor order y1= x0 + s.*hc; for i=1:n y1 = mapsf(0, y1,p1{:}); end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -