29 #include "matrix_decl.hpp"
44 SX SX::_sym(
const std::string& name,
const Sparsity& sp);
71 std::vector<SXElem> SX::call(
const Function& f,
const std::vector<SXElem>& dep);
94 template<>
bool SX::has_duplicates()
const;
96 template<>
void SX::reset_input()
const;
124 SX::substitute(
const std::vector<SX>& ex,
const std::vector<SX>& v,
const std::vector<SX>& vdef);
131 std::vector<SX>& ex,
bool reverse);
135 SX& expr_ret, std::vector<SX>& symbols, std::vector<SX>& parametric,
140 const SX &sym_lin,
const SX &sym_const,
141 SX& expr_const,
SX& expr_lin,
SX& expr_nonlin);
144 std::vector<SX>
SX::cse(
const std::vector<SX>& e);
163 std::vector<std::vector<SX> >
164 SX::forward(
const std::vector<SX> &ex,
const std::vector<SX> &arg,
165 const std::vector<std::vector<SX> > &v,
const Dict& opts);
168 std::vector<std::vector<SX> >
169 SX::reverse(
const std::vector<SX> &ex,
const std::vector<SX> &arg,
170 const std::vector<std::vector<SX> > &v,
const Dict& opts);
180 const SX& a, casadi_int order);
184 const std::vector<casadi_int>& order_contributions);
200 void SX::extract(std::vector<SX>& ex, std::vector<SX>& v_sx,
201 std::vector<SX>& vdef_sx,
const Dict& opts);
205 std::vector<SX>& v_sx,
206 std::vector<SX> & vdef_sx,
207 const std::string& v_prefix,
208 const std::string& v_suffix);
220 void SX::print_split(casadi_int nnz,
const SXElem* nonzeros, std::vector<std::string>& nz,
221 std::vector<std::string>& inter);
224 template<> std::vector<SX>
SX::get_free(
const Function& f);
229 void CASADI_EXPORT
SX::to_file(
const std::string& filename,
const Sparsity& sp,
230 const SXElem* nonzeros,
const std::string& format_hint);
232 #ifdef CASADI_WITH_THREADSAFE_SYMBOLICS
234 std::mutex& SX::get_mutex_temp();
237 #ifndef CASADI_SX_INSTANTIATOR_CPP
238 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.
Function which_function() const
Get function - only valid when is_call() is true.
casadi_int element_hash() const
Returns a number that is unique for a given symbolic scalar.
casadi_int which_output() const
Get the index of evaluation output - only valid when is_output() is true.
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_call() const
Check if function call.
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.
bool is_output() const
Check if evaluation output.
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.
bool has_output() const
Check if a multiple output node.
casadi_int op() const
Get operation type.
bool is_valid_input() const
Check if matrix can be used to define function inputs.
Matrix< Scalar > get_output(casadi_int oind) const
Get an output.
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.