FADBAD++利用C++的模板和操作符重载的方法实现了forward,backwardandTaylor方法。
TheseAD-templatesenabletheusertodifferentiatefunctionsthatareimplementedinarithmetictypes,suchasdoublesandintervals.OneofthemajorideasinFADBAD++isthattheAD-templatetypesalsobehavelikearithmetictypes.ThispropertyoftheAD-templatesenablestheusertodifferentiateaC++functionbyreplacingalloccurrencesoftheoriginalarithmetictypewiththeAD-templateversion.ThistransparencyofbehavioralsomakesitpossibletogeneratehighorderderivativesbyapplyingtheAD-templatesonthemselves,enablingtheusertocombinetheADmethodsveryeasily.
评论