5#include <proxsuite-nlp/third-party/polymorphic_cxx14.hpp>
13 using Scalar =
typename FunType::Scalar;
17 xyz::polymorphic<FunType>
func;
29 const ConstMatrixRef
A,
const ConstVectorRef
b)
34 if (
A.rows() !=
b.rows()) {
37 if (
A.cols() !=
func->nr) {
43 const ConstMatrixRef
A)
47 return std::make_shared<Data>(*
this);
52template <
typename _Scalar>
68 void evaluate(
const ConstVectorRef &x,
const ConstVectorRef &u,
75template <
typename _Scalar>
96template <
typename Scalar>
98 const typename math_types<Scalar>::ConstMatrixRef A,
99 const typename math_types<Scalar>::ConstVectorRef b) {
104template <
typename Scalar>
106 const typename math_types<Scalar>::ConstMatrixRef A,
107 const typename math_types<Scalar>::ConstVectorRef b) {
113#include "aligator/modelling/linear-function-composition.hxx"
#define ALIGATOR_RUNTIME_ERROR(...)
Base definitions for ternary functions.
auto linear_compose(xyz::polymorphic< StageFunctionTpl< Scalar > > func, const typename math_types< Scalar >::ConstMatrixRef A, const typename math_types< Scalar >::ConstVectorRef b)
Create a linear composition of the input function func.
void evaluate(const ConstVectorRef &x, const ConstVectorRef &u, BaseData &data) const override
void computeJacobians(const ConstVectorRef &x, const ConstVectorRef &u, BaseData &data) const override
typename Impl::FunType Base
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
ALIGATOR_UNARY_FUNCTION_INTERFACE(Scalar)
void evaluate(const ConstVectorRef &x, BaseData &data) const override
void computeJacobians(const ConstVectorRef &x, BaseData &data) const override
Base struct for function data.
Class representing ternary functions .
Represents unary functions of the form , with no control (or next-state) arguments.
shared_ptr< BaseData > sub_data
Data(const linear_func_composition_impl &model)
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
shared_ptr< BaseData > createData() const
linear_func_composition_impl(xyz::polymorphic< FunType > func, const ConstMatrixRef A)
xyz::polymorphic< FunType > func
typename FunType::Scalar Scalar
linear_func_composition_impl(xyz::polymorphic< FunType > func, const ConstMatrixRef A, const ConstVectorRef b)