26 #ifndef CASADI_TRANSPOSE_HPP
27 #define CASADI_TRANSPOSE_HPP
29 #include "mx_node.hpp"
53 int eval_gen(
const T*
const* arg, T*
const* res, casadi_int* iw, T* w)
const;
56 int eval(
const double** arg,
double** res, casadi_int* iw,
double* w)
const override;
59 int eval_sx(
const SXElem** arg,
SXElem** res, casadi_int* iw,
SXElem* w)
const override;
64 void eval_mx(
const std::vector<MX>& arg, std::vector<MX>& res,
65 const std::vector<bool>& unique={})
const override;
71 std::vector<std::array<MX, 3> >& res)
const override {
72 eval_linear_rearrange(arg, res);
79 return sp_forward(arg, res, iw, w);
85 void ad_forward(
const std::vector<std::vector<MX> >& fseed,
86 std::vector<std::vector<MX> >& fsens)
const override;
91 void ad_reverse(
const std::vector<std::vector<MX> >& aseed,
92 std::vector<std::vector<MX> >& asens)
const override;
97 int sp_forward(
const bvec_t** arg,
bvec_t** res, casadi_int* iw,
bvec_t* w)
const override;
107 std::string disp(
const std::vector<std::string>& arg)
const override;
113 const std::vector<casadi_int>& arg,
114 const std::vector<casadi_int>& res,
115 const std::vector<bool>& arg_is_ref,
116 std::vector<bool>& res_is_ref)
const override;
126 size_t sz_iw()
const override {
return size2()+1;}
159 return sameOpAndDeps(node, depth);
196 int eval_gen(
const T*
const* arg, T*
const* res, casadi_int* iw, T* w)
const;
199 int eval(
const double** arg,
double** res, casadi_int* iw,
double* w)
const override;
202 int eval_sx(
const SXElem** arg,
SXElem** res, casadi_int* iw,
SXElem* w)
const override;
207 int sp_forward(
const bvec_t** arg,
bvec_t** res, casadi_int* iw,
bvec_t* w)
const override;
218 const std::vector<casadi_int>& arg,
219 const std::vector<casadi_int>& res,
220 const std::vector<bool>& arg_is_ref,
221 std::vector<bool>& res_is_ref)
const override;
226 size_t sz_iw()
const override {
return 0;}
Helper class for C code generation.
~DenseTranspose() override
Destructor.
DenseTranspose(const MX &x)
Constructor.
size_t sz_iw() const override
Get required length of iw field.
DenseTranspose(DeserializingStream &s)
Deserializing constructor.
Helper class for Serialization.
Node class for MX objects.
virtual MX get_solve_triu(const MX &r, bool tr) const
Solve a system of linear equations, upper triangular A.
virtual MX get_solve_tril_unity(const MX &r, bool tr) const
Solve a system of linear equations, lower triangular A, unity diagnal.
virtual MX get_solve_tril(const MX &r, bool tr) const
Solve a system of linear equations, lower triangular A.
virtual MX get_solve_triu_unity(const MX &r, bool tr) const
Solve a system of linear equations, upper triangular A, unity diagonal.
The basic scalar symbolic class of CasADi.
Helper class for Serialization.
bool is_equal(const MXNode *node, casadi_int depth) const override
Check if two nodes are equivalent up to a given depth.
size_t sz_iw() const override
Get required length of iw field.
~Transpose() override
Destructor.
MX get_solve_tril_unity(const MX &r, bool tr) const override
Solve a system of linear equations, lower triangular A, unity diagonal.
casadi_int op() const override
Get the operation.
MX get_solve_tril(const MX &r, bool tr) const override
Solve a system of linear equations, lower triangular A.
int eval_activity(const bvec_t **arg, bvec_t **res, casadi_int *iw, bvec_t *w) const override
Propagate signal activity forward (bit set = active)
MX get_solve_triu(const MX &r, bool tr) const override
Solve for square linear system.
Transpose(DeserializingStream &s)
Deserializing constructor.
MX get_transpose() const override
Transpose.
void eval_linear(const std::vector< std::array< MX, 3 > > &arg, std::vector< std::array< MX, 3 > > &res) const override
Evaluate the MX node on a const/linear/nonlinear partition.
MX get_solve_triu_unity(const MX &r, bool tr) const override
Solve a system of linear equations, upper triangular A, unity diagonal.
unsigned long long bvec_t