| 562 | } |
| 563 | |
| 564 | std::vector<MatrixXd> var::_back(const MatrixXd & dx, const std::vector<var>& nonconsts) |
| 565 | { |
| 566 | auto operands = getChildren(); |
| 567 | std::vector<MatrixXd> derivatives; |
| 568 | for (size_t i = 0; i < operands.size(); i++) { |
| 569 | |
| 570 | if (std::end(nonconsts) == std::find(std::begin(nonconsts), std::end(nonconsts), operands[i])) |
| 571 | derivatives.push_back(zeros_like(operands[i])); // no gradient flow. |
| 572 | else |
| 573 | derivatives.push_back(_back_single(dx, i)); |
| 574 | } |
| 575 | return derivatives; |
| 576 | } |
| 577 | |
| 578 | std::vector<MatrixXd> var::_back(const MatrixXd & dx) |
| 579 | { |
no test coverage detected