| 1022 | } |
| 1023 | |
| 1024 | shared_ptr<CoefficientFunction> DiffJacobi (const CoefficientFunction * var, T_DJC & cache) const override |
| 1025 | { |
| 1026 | auto thisptr = const_pointer_cast<CoefficientFunction>(this->shared_from_this()); |
| 1027 | if (cache.find(thisptr) != cache.end()) |
| 1028 | return cache[thisptr]; |
| 1029 | |
| 1030 | if (this == var) |
| 1031 | return IdentityCF(this->Dimensions()); |
| 1032 | |
| 1033 | auto diffc1 = c1->DiffJacobi (var, cache); |
| 1034 | auto res = 0.5*(diffc1 + diffc1 -> TensorTranspose( 0, 1 )); |
| 1035 | cache[thisptr] = res; |
| 1036 | return res; |
| 1037 | } |
| 1038 | }; |
| 1039 | |
| 1040 |
nothing calls this directly
no test coverage detected