26 #ifndef CASADI_BINARY_MX_HPP
27 #define CASADI_BINARY_MX_HPP
29 #include "mx_node.hpp"
40 template<
bool ScX,
bool ScY>
56 std::string disp(
const std::vector<std::string>& arg)
const override;
61 casadi_int
op()
const override {
return op_;}
71 void eval_mx(
const std::vector<MX>& arg, std::vector<MX>& res,
72 const std::vector<bool>& unique=std::vector<bool>())
const override;
77 void eval_linear(
const std::vector<std::array<MX, 3> >& arg,
78 std::vector<std::array<MX, 3> >& res)
const override;
83 void ad_forward(
const std::vector<std::vector<MX> >& fseed,
84 std::vector<std::vector<MX> >& fsens)
const override;
89 void ad_reverse(
const std::vector<std::vector<MX> >& aseed,
90 std::vector<std::vector<MX> >& asens)
const override;
95 int sp_forward(
const bvec_t** arg,
bvec_t** res, casadi_int* iw,
bvec_t* w)
const override;
100 int eval_activity(
const bvec_t** arg,
bvec_t** res, casadi_int* iw,
bvec_t* w)
const override;
109 int eval_gen(
const T*
const* arg, T*
const* res, casadi_int* iw, T* w)
const;
112 int eval(
const double** arg,
double** res, casadi_int* iw,
double* w)
const override;
115 int eval_sx(
const SXElem** arg,
SXElem** res, casadi_int* iw,
SXElem* w)
const override;
124 const std::vector<casadi_int>& arg,
125 const std::vector<casadi_int>& res,
126 const std::vector<bool>& arg_is_ref,
127 std::vector<bool>& res_is_ref)
const override;
145 MX _get_binary(casadi_int op,
const MX& y,
bool scX,
bool scY,
146 bool unique_x=
false,
bool unique_y=
false)
const override;
152 if (op_==node->
op()) {
159 return operation_checker<CommChecker>(op_)
169 MX get_solve_triu(
const MX& r,
bool tr)
const override;
172 MX get_solve_tril(
const MX& r,
bool tr)
const override;
Represents any binary operation that involves two matrices.
bool is_binary() const override
Check if binary operation.
casadi_int op() const override
Get the operation.
casadi_int n_inplace() const override
Can the operation be performed inplace (i.e. overwrite the result)
bool is_equal(const MXNode *node, casadi_int depth) const override
Check if two nodes are equivalent up to a given depth.
Helper class for C code generation.
Helper class for Serialization.
Node class for MX objects.
const MX & dep(casadi_int ind=0) const
dependencies - functions that have to be evaluated before this one
virtual casadi_int op() const =0
Get the operation.
static bool is_equal(const MX &x, const MX &y, casadi_int depth=0)
The basic scalar symbolic class of CasADi.
Helper class for Serialization.
unsigned long long bvec_t
Operation
Enum for quick access to any node.