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)
const override;
70 std::vector<std::array<MX, 3> >& res)
const override {
71 eval_linear_rearrange(arg, res);
77 void ad_forward(
const std::vector<std::vector<MX> >& fseed,
78 std::vector<std::vector<MX> >& fsens)
const override;
83 void ad_reverse(
const std::vector<std::vector<MX> >& aseed,
84 std::vector<std::vector<MX> >& asens)
const override;
89 int sp_forward(
const bvec_t** arg,
bvec_t** res, casadi_int* iw,
bvec_t* w)
const override;
99 std::string disp(
const std::vector<std::string>& arg)
const override;
105 const std::vector<casadi_int>& arg,
106 const std::vector<casadi_int>& res,
107 const std::vector<bool>& arg_is_ref,
108 std::vector<bool>& res_is_ref)
const override;
118 size_t sz_iw()
const override {
return size2()+1;}
151 return sameOpAndDeps(node, depth);
188 int eval_gen(
const T*
const* arg, T*
const* res, casadi_int* iw, T* w)
const;
191 int eval(
const double** arg,
double** res, casadi_int* iw,
double* w)
const override;
194 int eval_sx(
const SXElem** arg,
SXElem** res, casadi_int* iw,
SXElem* w)
const override;
199 int sp_forward(
const bvec_t** arg,
bvec_t** res, casadi_int* iw,
bvec_t* w)
const override;
210 const std::vector<casadi_int>& arg,
211 const std::vector<casadi_int>& res,
212 const std::vector<bool>& arg_is_ref,
213 std::vector<bool>& res_is_ref)
const override;
218 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.
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