29 #include "matrix_decl.hpp"
44 SX SX::_sym(
const std::string& name,
const Sparsity& sp);
73 template<>
bool SX::has_duplicates()
const;
75 template<>
void SX::reset_input()
const;
103 SX::substitute(
const std::vector<SX>& ex,
const std::vector<SX>& v,
const std::vector<SX>& vdef);
110 std::vector<SX>& ex,
bool reverse);
113 std::vector<SX>
SX::cse(
const std::vector<SX>& e);
126 std::vector<std::vector<SX> >
127 SX::forward(
const std::vector<SX> &ex,
const std::vector<SX> &arg,
128 const std::vector<std::vector<SX> > &v,
const Dict& opts);
131 std::vector<std::vector<SX> >
132 SX::reverse(
const std::vector<SX> &ex,
const std::vector<SX> &arg,
133 const std::vector<std::vector<SX> > &v,
const Dict& opts);
143 const SX& a, casadi_int order);
147 const std::vector<casadi_int>& order_contributions);
163 void SX::extract(std::vector<SX>& ex, std::vector<SX>& v_sx,
164 std::vector<SX>& vdef_sx,
const Dict& opts);
168 std::vector<SX>& v_sx,
169 std::vector<SX> & vdef_sx,
170 const std::string& v_prefix,
171 const std::string& v_suffix);
183 void SX::print_split(casadi_int nnz,
const SXElem* nonzeros, std::vector<std::string>& nz,
184 std::vector<std::string>& inter);
187 template<> std::vector<SX>
SX::get_free(
const Function& f);
192 void CASADI_EXPORT
SX::to_file(
const std::string& filename,
const Sparsity& sp,
193 const SXElem* nonzeros,
const std::string& format_hint);
196 #ifndef CASADI_SX_INSTANTIATOR_CPP
197 extern template class Matrix<SXElem>;
void print_split(std::vector< std::string > &nz, std::vector< std::string > &inter) const
Get strings corresponding to the nonzeros and the interdependencies.
bool is_regular() const
Checks if expression does not contain NaN or Inf.
static void set_max_depth(casadi_int eq_depth=1)
Set or reset the depth to which equalities are being checked for simplifications.
casadi_int element_hash() const
Returns a number that is unique for a given symbolic scalar.
bool is_commutative() const
Check whether a binary SX is commutative.
bool is_symbolic() const
Check if symbolic (Dense)
static std::vector< Matrix< Scalar > > get_free(const Function &f)
Get free.
static casadi_int get_max_depth()
Get the depth to which equalities are being checked for simplifications.
bool is_smooth() const
Check if smooth.
void to_file(const std::string &filename, const std::string &format="") const
bool __nonzero__() const
Returns the truth value of a Matrix.
bool is_op(casadi_int op) const
Is it a certain operation.
static std::vector< Matrix< Scalar > > get_input(const Function &f)
Get function input.
Matrix< Scalar > dep(casadi_int ch=0) const
Get expressions of the children of the expression.
casadi_int op() const
Get operation type.
bool is_valid_input() const
Check if matrix can be used to define function inputs.
casadi_int n_dep() const
Get the number of dependencies of a binary SXElem.
bool is_leaf() const
Check if SX is a leaf of the SX graph.
std::string name() const
Get name (only if symbolic scalar)
std::string matrixName< SXElem >()
GenericType::Dict Dict
C++ equivalent of Python's dict or MATLAB's struct.