26 #include "subassign.hpp"
32 casadi_error(
"not ready");
35 int SubAssign::eval(
const double** arg,
double** res, casadi_int* iw,
double* w)
const {
36 return eval_gen<double>(arg, res, iw, w);
40 return eval_gen<SXElem>(arg, res, iw, w);
45 casadi_error(
"not ready");
50 casadi_error(
"not ready");
55 casadi_error(
"not ready");
61 ss <<
"(" << arg.at(0) <<
"[" <<
i_ <<
", " <<
j_ <<
"]=" << arg.at(1) <<
")";
66 casadi_error(
"not ready");
70 std::vector<std::vector<MX> >& fsens)
const {
71 casadi_error(
"not ready");
75 std::vector<std::vector<MX> >& asens)
const {
76 casadi_error(
"not ready");
80 const std::vector<casadi_int>& arg,
81 const std::vector<casadi_int>& res,
82 const std::vector<bool>& arg_is_ref,
83 std::vector<bool>& res_is_ref)
const {
84 casadi_error(
"not ready");
Helper class for C code generation.
void set_dep(const MX &dep)
Set unary dependency.
The basic scalar symbolic class of CasADi.
Class representing a Slice.
int eval(const double **arg, double **res, casadi_int *iw, double *w) const override
Evaluate the function numerically.
void generate(CodeGenerator &g, const std::vector< casadi_int > &arg, const std::vector< casadi_int > &res, const std::vector< bool > &arg_is_ref, std::vector< bool > &res_is_ref) const override
Generate code for the operation.
int eval_sx(const SXElem **arg, SXElem **res, casadi_int *iw, SXElem *w) const override
Evaluate the function symbolically (SX)
void ad_reverse(const std::vector< std::vector< MX > > &aseed, std::vector< std::vector< MX > > &asens) const override
Calculate reverse mode directional derivatives.
int sp_forward(const bvec_t **arg, bvec_t **res, casadi_int *iw, bvec_t *w) const override
Propagate sparsity forward.
Dict info() const override
int eval_gen(const T *const *arg, T *const *res, casadi_int *iw, T *w) const
Evaluate the function (template)
std::string disp(const std::vector< std::string > &arg) const override
Print expression.
void eval_mx(const std::vector< MX > &arg, std::vector< MX > &res) const override
Evaluate symbolically (MX)
void ad_forward(const std::vector< std::vector< MX > > &fseed, std::vector< std::vector< MX > > &fsens) const override
Calculate forward mode directional derivatives.
int sp_reverse(bvec_t **arg, bvec_t **res, casadi_int *iw, bvec_t *w) const override
Propagate sparsity backwards.
SubAssign(const MX &x, const MX &y, const Slice &i, const Slice &j)
Constructor.
unsigned long long bvec_t
GenericType::Dict Dict
C++ equivalent of Python's dict or MATLAB's struct.