26 #ifndef CASADI_LINEAR_INTERPOLANT_HPP
27 #define CASADI_LINEAR_INTERPOLANT_HPP
29 #include "casadi/core/interpolant_impl.hpp"
30 #include <casadi/solvers/casadi_interpolant_linear_export.h>
55 const std::vector<double>& grid,
56 const std::vector<casadi_int>& offset,
57 const std::vector<double>& values,
67 std::string
class_name()
const override {
return "LinearInterpolant";}
71 const std::vector<double>& grid,
72 const std::vector<casadi_int>& offset,
73 const std::vector<double>& values,
79 const std::vector<double>& grid,
80 const std::vector<casadi_int>& offset,
81 const std::vector<double>& values,
86 void init(
const Dict& opts)
override;
89 int eval(
const double** arg,
double** res, casadi_int* iw,
double* w,
void* mem)
const override;
94 Function get_jacobian(
const std::string& name,
95 const std::vector<std::string>& inames,
96 const std::vector<std::string>& onames,
97 const Dict& opts)
const override;
140 std::string
class_name()
const override {
return "LinearInterpolantJac";}
149 void init(
const Dict& opts)
override;
152 int eval(
const double** arg,
double** res, casadi_int* iw,
double* w,
void* mem)
const override;
157 Function get_jacobian(
const std::string& name,
158 const std::vector<std::string>& inames,
159 const std::vector<std::string>& onames,
160 const Dict& opts)
const override;
167 bool has_parametric_values()
const;
168 bool has_parametric_grid()
const;
Helper class for C code generation.
Helper class for Serialization.
Internal class for Function.
bool has_codegen() const override
Is codegen supported?
bool has_jacobian() const override
Full Jacobian.
std::string serialize_base_function() const override
String used to identify the immediate FunctionInternal subclass.
LinearInterpolantJac(DeserializingStream &s)
Deserializing constructor.
LinearInterpolantJac(const std::string &name)
Constructor.
std::string class_name() const override
Get type name.
'linear' plugin for Interpolant Implements a multilinear interpolant: For 1D, the interpolating polyn...
static Interpolant * creator(const std::string &name, const std::vector< double > &grid, const std::vector< casadi_int > &offset, const std::vector< double > &values, casadi_int m)
Create a new Interpolant.
const Options & get_options() const override
Options.
static const Options options_
Options.
std::vector< casadi_int > lookup_mode_
const char * plugin_name() const override
bool has_jacobian() const override
Full Jacobian.
bool has_codegen() const override
Is codegen supported?
std::string class_name() const override
Get type name.
static const std::string meta_doc
A documentation string.
Base class for FunctionInternal and LinsolInternal.
Helper class for Serialization.
GenericType::Dict Dict
C++ equivalent of Python's dict or MATLAB's struct.
MX do_inline(const MX &x, const std::vector< std::vector< double > > &knots, const MX &coeffs, casadi_int m, const std::vector< casadi_int > °ree, const std::vector< casadi_int > &lookup_mode)
Options metadata for a class.