14template <
typename _Scalar>
struct ComposeFunctionTpl : C2FunctionTpl<_Scalar> {
24 const shared_ptr<Base> &
right)
29 "Incompatible dimensions ({:d} and {:d}).",
left->
nx(),
right->
nr()));
47 shared_ptr<Base> left_;
48 shared_ptr<Base> right_;
55template <
typename Scalar>
58 return std::make_shared<ComposeFunctionTpl<Scalar>>(left, right);
64#ifdef PROXSUITE_NLP_ENABLE_TEMPLATE_INSTANTIATION
65#include "proxsuite-nlp/function-ops.txx"
#define PROXSUITE_NLP_RUNTIME_ERROR(msg)
Base definitions for function classes.
#define PROXSUITE_NLP_DYNAMIC_TYPEDEFS(Scalar)
auto compose(const shared_ptr< C2FunctionTpl< Scalar > > &left, const shared_ptr< C2FunctionTpl< Scalar > > &right)
Compose two function objects.
virtual void computeJacobian(const ConstVectorRef &x, MatrixRef Jout) const=0
Twice-differentiable function, with method Jacobian and vector-hessian product evaluation.
virtual void vectorHessianProduct(const ConstVectorRef &, const ConstVectorRef &, MatrixRef Hout) const
Vector-hessian product.
const Base & right() const
const Base & left() const
ComposeFunctionTpl(const shared_ptr< Base > &left, const shared_ptr< Base > &right)
void computeJacobian(const ConstVectorRef &x, MatrixRef Jout) const
Jacobian matrix of the constraint function.
VectorXs operator()(const ConstVectorRef &x) const
Evaluate the residual at a given point x.