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;
126 SX SX::transform(
const SX& x,
const std::vector<std::vector<GenericType> >& passes,
134 const std::vector<std::vector<GenericType> >& passes,
const Dict& opts);
138 SX::substitute(
const std::vector<SX>& ex,
const std::vector<SX>& v,
const std::vector<SX>& vdef);
145 std::vector<SX>& ex,
bool reverse);
149 SX& expr_ret, std::vector<SX>& symbols, std::vector<SX>& parametric,
154 const SX &sym_lin,
const SX &sym_const,
155 SX& expr_const,
SX& expr_lin,
SX& expr_nonlin);
158 std::vector<SX>
SX::cse(
const std::vector<SX>& e);
177 std::vector<std::vector<SX> >
178 SX::forward(
const std::vector<SX> &ex,
const std::vector<SX> &arg,
179 const std::vector<std::vector<SX> > &v,
const Dict& opts);
182 std::vector<std::vector<SX> >
183 SX::reverse(
const std::vector<SX> &ex,
const std::vector<SX> &arg,
184 const std::vector<std::vector<SX> > &v,
const Dict& opts);
194 const SX& a, casadi_int order);
198 const std::vector<casadi_int>& order_contributions);
214 void SX::extract(std::vector<SX>& ex, std::vector<SX>& v_sx,
215 std::vector<SX>& vdef_sx,
const Dict& opts);
219 std::vector<SX>& v_sx,
220 std::vector<SX> & vdef_sx,
221 const std::string& v_prefix,
222 const std::string& v_suffix);
237 void SX::print_split(casadi_int nnz,
const SXElem* nonzeros, std::vector<std::string>& nz,
238 std::vector<std::string>& inter);
241 template<> std::vector<SX>
SX::get_free(
const Function& f);
246 void CASADI_EXPORT
SX::to_file(
const std::string& filename,
const Sparsity& sp,
247 const SXElem* nonzeros,
const std::string& format_hint);
250 bool CASADI_EXPORT SX::simplify_ref_count(std::vector<SX>& arg,
251 std::vector<SX>& res,
255 bool CASADI_EXPORT SX::simplify_const_folding(std::vector<SX>& arg,
256 std::vector<SX>& res,
260 bool CASADI_EXPORT SX::simplify_combine_terms(std::vector<SX>& arg,
261 std::vector<SX>& res,
264 #ifdef CASADI_WITH_THREADSAFE_SYMBOLICS
266 std::mutex& SX::get_mutex_temp();
269 #ifndef CASADI_SX_INSTANTIATOR_CPP
270 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.