10template <
typename Scalar>
13 assert((left->nx() == right->nx()) && (left->ndx() == right->ndx()) &&
14 "Left and right should have the same input spaces.");
15 auto out = std::make_shared<CostSumTpl<Scalar>>(left->nx(), left->ndx());
23template <
typename Scalar>
27 return std::move(left);
31template <
typename Scalar>
32auto operator*(Scalar left,
34 auto out = std::make_shared<CostSumTpl<Scalar>>(right->nx(), right->ndx());
35 out->addComponent(right, left);
Base class for differentiable cost functions.
Defines the sum of one or more cost functions .