The basic scalar symbolic class of CasADi. More...
#include <sx_elem.hpp>
SXElem is exposed only as an empty struct to SWIG
Extra doc: https://github.com/casadi/casadi/wiki/L_10i
Definition at line 74 of file sx_elem.hpp.
Public Member Functions | |
SXElem () | |
Default constructor (not-a-number) More... | |
SXElem (double val) | |
Numerical constant constructor. More... | |
SXElem (SXNode *node, bool dummy) | |
SXElem (const SXElem &scalar) | |
Copy constructor. More... | |
~SXElem () | |
Destructor. More... | |
SXElem & | operator= (const SXElem &scalar) |
Assignment. More... | |
SXElem & | operator= (double scalar) |
operator Matrix< SXElem > () const | |
Convert to a 1-by-1 Matrix. More... | |
void | disp (std::ostream &stream, bool more=false) const |
Print a description of the object. More... | |
SXNode * | get () const |
Get a pointer to the node. More... | |
const SXNode * | operator-> () const |
Access functions of the node. More... | |
SXNode * | operator-> () |
bool | __nonzero__ () const |
Check the truth value of this node. More... | |
bool | is_leaf () const |
check if this SXElem is a leaf of the SX graph More... | |
bool | is_constant () const |
bool | is_integer () const |
bool | is_symbolic () const |
bool | is_commutative () const |
Check whether a binary SXElem is commutative. More... | |
bool | is_zero () const |
bool | is_almost_zero (double tol) const |
bool | is_one () const |
bool | is_minus_one () const |
bool | is_nan () const |
bool | is_inf () const |
bool | is_minus_inf () const |
const std::string & | name () const |
casadi_int | op () const |
bool | is_op (casadi_int op) const |
bool | is_call () const |
bool | is_output () const |
bool | has_output () const |
Function | which_function () const |
casadi_int | which_output () const |
bool | is_regular () const |
Checks if expression does not contain NaN or Inf. More... | |
bool | is_nonnegative () const |
Check if a value is always nonnegative (false negatives are allowed) More... | |
SXElem | dep (casadi_int ch=0) const |
operator double () const | |
Type conversion to double. More... | |
operator casadi_int () const | |
Type conversion to casadi_int. More... | |
bool | is_doubled () const |
Check if the node is the sum of two equal expressions. More... | |
casadi_int | n_dep () const |
Get the number of dependencies of a binary SXElem. More... | |
SXElem | get_output (casadi_int oind) const |
Get an output. More... | |
casadi_int | __hash__ () const |
Returns a number that is unique for a given SXNode. More... | |
SXElem | operator- () const |
Negation. More... | |
SXElem | inv () const |
Element-wise inverse. More... | |
int | get_temp () const |
void | set_temp (int t) const |
Set the temporary variable. More... | |
bool | marked () const |
Check if marked (i.e. temporary is negative) More... | |
void | mark () const |
Mark by flipping the sign of the temporary and decreasing by one. More... | |
void | assignIfDuplicate (const SXElem &scalar, casadi_int depth=1) |
Assign to another expression, if a duplicate. More... | |
SXNode * | assignNoDelete (const SXElem &scalar) |
Assign the node to something, without invoking the deletion of the node,. More... | |
bool | is_null () |
SXElem nodes are not allowed to be null. More... | |
void | serialize (SerializingStream &s) const |
Serialize an object. More... | |
SXElem & | operator+= (const SXElem &y) |
Static Public Member Functions | |
static SXElem | sym (const std::string &name) |
Create a symbolic primitive. More... | |
static SXElem | create (SXNode *node) |
static std::string | type_name () |
Type name. More... | |
static SXElem | binary (casadi_int op, const SXElem &x, const SXElem &y) |
Perform operations by ID. More... | |
static SXElem | unary (casadi_int op, const SXElem &x) |
static std::vector< SXElem > | call (const Function &f, const std::vector< SXElem > &deps) |
static bool | is_equal (const SXElem &x, const SXElem &y, casadi_int depth=0) |
Check equality up to a given depth. More... | |
static SXElem | deserialize (DeserializingStream &s) |
static SXElem | plus (const SXElem &x, const SXElem &y) |
Addition: (x,y) -> x + y. More... | |
static SXElem | lt (const SXElem &x, const SXElem &y) |
Logical less than: (x,y) -> x < y. More... | |
static SXElem | le (const SXElem &x, const SXElem &y) |
Logical less or equal to: (x,y) -> x <= y. More... | |
static SXElem | gt (const SXElem &x, const SXElem &y) |
Logical greater than: (x,y) -> x > y. More... | |
static SXElem | ge (const SXElem &x, const SXElem &y) |
Logical greater or equal to: (x,y) -> x >= y. More... | |
static SXElem | eq (const SXElem &x, const SXElem &y) |
Logical equal to: (x,y) -> x == y. More... | |
static SXElem | ne (const SXElem &x, const SXElem &y) |
Logical not equal to: (x,y) -> x != y. More... | |
static SXElem | logic_and (const SXElem &x, const SXElem &y) |
Logical and More... | |
static SXElem | logic_or (const SXElem &x, const SXElem &y) |
Logical or More... | |
static SXElem | abs (const SXElem &x) |
Absolute value: x -> abs(x) More... | |
static SXElem | sqrt (const SXElem &x) |
Square root: x -> sqrt(x) More... | |
static SXElem | sq (const SXElem &x) |
Square: x -> x^2. More... | |
static SXElem | sin (const SXElem &x) |
Sine: x -> sin(x) More... | |
static SXElem | cos (const SXElem &x) |
Cosine: x -> cos(x) More... | |
static SXElem | tan (const SXElem &x) |
Tangent: x -> tan(x) More... | |
static SXElem | atan (const SXElem &x) |
Arc tangent: x -> atan(x) More... | |
static SXElem | asin (const SXElem &x) |
Arc sine: x -> asin(x) More... | |
static SXElem | acos (const SXElem &x) |
Arc cosine: x -> acos(x) More... | |
static SXElem | tanh (const SXElem &x) |
Hyperbolic tangent: x -> tanh(x) More... | |
static SXElem | sinh (const SXElem &x) |
Hyperbolic sin: x -> sinh(x) More... | |
static SXElem | cosh (const SXElem &x) |
Hyperbolic cosine: x -> cosh(x) More... | |
static SXElem | atanh (const SXElem &x) |
Inverse hyperbolic tangent: x -> atanh(x) More... | |
static SXElem | asinh (const SXElem &x) |
Inverse hyperbolic sin: x -> asinh(x) More... | |
static SXElem | acosh (const SXElem &x) |
Inverse hyperbolic cosine: x -> acosh(x) More... | |
static SXElem | exp (const SXElem &x) |
Elementwise exponential: x -> exp(x) More... | |
static SXElem | log (const SXElem &x) |
Natural logarithm: x -> log(x) More... | |
static SXElem | log10 (const SXElem &x) |
Base-10 logarithm: x -> log10(x) More... | |
static SXElem | log1p (const SXElem &x) |
Precision variant for natural logarithm: x -> log(x+1) More... | |
static SXElem | expm1 (const SXElem &x) |
Precision variant for elementwise exponential: x -> exp(x)-1. More... | |
static SXElem | floor (const SXElem &x) |
Round down to nearest integer: x -> floor(x) More... | |
static SXElem | ceil (const SXElem &x) |
Round up to nearest integer: x -> ceil(x) More... | |
static SXElem | erf (const SXElem &x) |
Error function: x -> erf(x) More... | |
static SXElem | erfinv (const SXElem &x) |
Inverse error function: x -> erfinv(x) More... | |
static SXElem | sign (const SXElem &x) |
Sign function: More... | |
static SXElem | pow (const SXElem &x, const SXElem &y) |
Elementwise power: (x,y) -> x.^y. More... | |
static SXElem | mod (const SXElem &x, const SXElem &y) |
Remainder after division: (x,y) -> fmod(x,y) More... | |
static SXElem | remainder (const SXElem &x, const SXElem &y) |
Remainder after division: (x,y) -> remainder(x,y) More... | |
static SXElem | atan2 (const SXElem &y, const SXElem &x) |
Two argument arc tangent: (y,x) -> atan2(y,x) More... | |
static SXElem | if_else_zero (const SXElem &x, const SXElem &y) |
Conditional assignment: (x,y) -> x ? y : 0. More... | |
static SXElem | fmin (const SXElem &x, const SXElem &y) |
Smallest of two values: (x,y) -> min(x,y) More... | |
static SXElem | fmax (const SXElem &x, const SXElem &y) |
Largest of two values: (x,y) -> max(x,y) More... | |
static SXElem | copysign (const SXElem &x, const SXElem &y) |
static SXElem | constpow (const SXElem &x, const SXElem &y) |
static SXElem | printme (const SXElem &x, const SXElem &y) |
static SXElem | hypot (const SXElem &x, const SXElem &y) |
Precision variant for 2 norm: (x,y) -> sqrt(x^2+y^2) More... | |
Protected Member Functions | |
const SXElem & | self () const |
SXElem & | self () |
Friends | |
class | SXNode |
class | BinarySXNode |
class | Matrix< SXElem > |
SXElem | if_else (const SXElem &x, const SXElem &y, const SXElem &z) |
Ternary if_else: x ? y : z. More... | |
SXElem & | operator-= (const SXElem &y) |
Subtraction: (x,y) -> x - y. More... | |
static SXElem | minus (const SXElem &x, const SXElem &y) |
Subtraction: (x,y) -> x - y. More... | |
SXElem & | operator*= (const SXElem &y) |
Elementwise multiplication: (x,y) -> x .* y. More... | |
static SXElem | times (const SXElem &x, const SXElem &y) |
Elementwise multiplication: (x,y) -> x .* y. More... | |
SXElem & | operator/= (const SXElem &y) |
Elementwise division: (x,y) -> x ./ y. More... | |
static SXElem | rdivide (const SXElem &x, const SXElem &y) |
Elementwise division: (x,y) -> x ./ y. More... | |
SXElem | operator! () const |
Logical not x -> !x. More... | |
static SXElem | logic_not (const SXElem &x) |
Logical not x -> !x. More... | |
casadi::SXElem::SXElem | ( | ) |
Object is initialized as not-a-number.
Extra doc: https://github.com/casadi/casadi/wiki/L_10j
Definition at line 53 of file sx_elem.cpp.
References casadi::SXNode::count.
Referenced by create(), and operator=().
casadi::SXElem::SXElem | ( | double | val | ) |
val | Numerical value |
Extra doc: https://github.com/casadi/casadi/wiki/L_10k
Definition at line 71 of file sx_elem.cpp.
References casadi::SXNode::count, casadi::IntegerSX::create(), and casadi::RealtypeSX::create().
casadi::SXElem::SXElem | ( | SXNode * | node, |
bool | dummy | ||
) |
Create an expression from a node: extra dummy argument to avoid ambiguity for 0/NULL
Definition at line 58 of file sx_elem.cpp.
References casadi::SXNode::count.
casadi::SXElem::SXElem | ( | const SXElem & | scalar | ) |
Extra doc: https://github.com/casadi/casadi/wiki/L_10m
Definition at line 66 of file sx_elem.cpp.
References casadi::SXNode::count.
casadi::SXElem::~SXElem | ( | ) |
Definition at line 94 of file sx_elem.cpp.
References casadi::SXNode::count.
casadi_int casadi::SXElem::__hash__ | ( | ) | const |
If the SXElem does not point to any node, 0 is returned.
Extra doc: https://github.com/casadi/casadi/wiki/L_10w
Definition at line 571 of file sx_elem.cpp.
bool casadi::SXElem::__nonzero__ | ( | ) | const |
Introduced to catch bool(x) situations in python
Extra doc: https://github.com/casadi/casadi/wiki/L_10q
Definition at line 157 of file sx_elem.cpp.
References is_constant(), and is_zero().
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_p0
Definition at line 275 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_p8
Definition at line 374 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_pe
Definition at line 446 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_p7
Definition at line 362 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_pd
Definition at line 434 of file generic_expression.hpp.
void casadi::SXElem::assignIfDuplicate | ( | const SXElem & | scalar, |
casadi_int | depth = 1 |
||
) |
Check for equality up to a given depth
Extra doc: https://github.com/casadi/casadi/wiki/L_110
Definition at line 111 of file sx_elem.cpp.
References is_equal().
Referenced by casadi::SXFunction::eval_sx().
if the count reaches 0
Extra doc: https://github.com/casadi/casadi/wiki/L_111
Definition at line 118 of file sx_elem.cpp.
References casadi::SXNode::count.
Referenced by casadi::SXNode::safe_delete(), casadi::BinarySX::~BinarySX(), and casadi::UnarySX::~UnarySX().
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_p6
Definition at line 350 of file generic_expression.hpp.
|
inlinestaticinherited |
theta = atan2(y,x) corresponds to x = r cos(theta), y = r sin(theta)
Extra doc: https://github.com/casadi/casadi/wiki/L_pr
Definition at line 648 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_pc
Definition at line 422 of file generic_expression.hpp.
Extra doc: https://github.com/casadi/casadi/wiki/L_10p
Definition at line 186 of file sx_elem.cpp.
References casadi::BinarySX::create(), dep(), casadi::SXNode::dep(), casadi::SXNode::eq_depth_, casadi::GenericExpression< SXElem >::if_else_zero(), inv(), is_constant(), casadi::SXNode::is_constant(), is_doubled(), is_equal(), is_inf(), casadi::SXNode::is_integer(), is_minus_inf(), is_minus_one(), casadi::SXNode::is_minus_one(), is_nonnegative(), is_one(), casadi::SXNode::is_one(), is_op(), is_zero(), casadi::SXNode::is_zero(), op(), casadi::OP_ADD, casadi::OP_CONSTPOW, casadi::OP_COS, casadi::OP_DIV, casadi::OP_EQ, casadi::OP_FMAX, casadi::OP_FMIN, casadi::OP_IF_ELSE_ZERO, casadi::OP_INV, casadi::OP_LE, casadi::OP_LT, casadi::OP_MUL, casadi::OP_NE, casadi::OP_NEG, casadi::OP_POW, casadi::OP_SIN, casadi::OP_SQ, casadi::OP_SUB, casadi::GenericExpression< SXElem >::pow(), casadi::GlobalOptions::simplification_on_the_fly, casadi::GenericExpression< SXElem >::sq(), casadi::GenericExpression< SXElem >::sqrt(), casadi::SXNode::to_double(), and casadi::SXNode::to_int().
|
static |
Definition at line 403 of file sx_elem.cpp.
References casadi::CallSX::create(), casadi::Function::nnz_out(), and casadi::OutputSX::split().
Referenced by casadi::SXFunction::ad_forward(), casadi::SXFunction::ad_reverse(), casadi::CallSX::eval_sx(), and casadi::SXFunction::eval_sx().
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_pl
Definition at line 530 of file generic_expression.hpp.
|
inlinestaticinherited |
Elementwise power with const power
Definition at line 720 of file generic_expression.hpp.
|
inlinestaticinherited |
Copy sign
Definition at line 710 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_p4
Definition at line 326 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_pb
Definition at line 410 of file generic_expression.hpp.
Create an object given a node
Definition at line 62 of file sx_elem.cpp.
References SXElem().
Referenced by casadi::CallSX::create(), casadi::UnarySX::create(), casadi::BinarySX::create(), deserialize(), casadi::CallSX::get_output(), casadi::SXFunction::init(), casadi::SXFunction::order(), and sym().
SXElem casadi::SXElem::dep | ( | casadi_int | ch = 0 | ) | const |
Definition at line 558 of file sx_elem.cpp.
References casadi::SXNode::dep(), and n_dep().
Referenced by binary(), inv(), is_doubled(), operator-(), and unary().
|
static |
Definition at line 659 of file sx_elem.cpp.
References create(), and casadi::SXNode::deserialize().
void casadi::SXElem::disp | ( | std::ostream & | stream, |
bool | more = false |
||
) | const |
Definition at line 140 of file sx_elem.cpp.
References casadi::SXNode::disp().
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_ov
Definition at line 191 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_pm
Definition at line 542 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_pn
Definition at line 554 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_pf
Definition at line 458 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_pj
Definition at line 506 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_pk
Definition at line 518 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_pu
Definition at line 684 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_pt
Definition at line 672 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_ou
Definition at line 176 of file generic_expression.hpp.
SXNode * casadi::SXElem::get | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_10n
Definition at line 174 of file sx_elem.cpp.
Referenced by casadi::SXFunction::init(), is_equal(), and casadi::register_symbol().
SXElem casadi::SXElem::get_output | ( | casadi_int | oind | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_29f
Definition at line 567 of file sx_elem.cpp.
References casadi::SXNode::get_output().
Referenced by casadi::OutputSX::split().
int casadi::SXElem::get_temp | ( | ) | const |
Get the temporary variable
Definition at line 631 of file sx_elem.cpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_ot
Definition at line 161 of file generic_expression.hpp.
bool casadi::SXElem::has_output | ( | ) | const |
Definition at line 469 of file sx_elem.cpp.
References casadi::SXNode::has_output().
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_pw
Definition at line 742 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_ps
Definition at line 660 of file generic_expression.hpp.
SXElem casadi::SXElem::inv | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_10y
Definition at line 166 of file sx_elem.cpp.
References casadi::UnarySX::create(), dep(), is_op(), and casadi::OP_INV.
Referenced by binary().
bool casadi::SXElem::is_almost_zero | ( | double | tol | ) | const |
Definition at line 493 of file sx_elem.cpp.
References casadi::SXNode::is_almost_zero().
Referenced by casadi::casadi_limits< SXElem >::is_almost_zero().
bool casadi::SXElem::is_call | ( | ) | const |
Definition at line 461 of file sx_elem.cpp.
References casadi::SXNode::is_call().
bool casadi::SXElem::is_commutative | ( | ) | const |
bool casadi::SXElem::is_constant | ( | ) | const |
Definition at line 457 of file sx_elem.cpp.
References casadi::SXNode::is_constant().
Referenced by __nonzero__(), binary(), casadi::UnarySX::create(), casadi::BinarySX::create(), casadi::casadi_limits< SXElem >::is_constant(), is_leaf(), is_nonnegative(), casadi::Matrix< Scalar >::is_regular(), and is_regular().
bool casadi::SXElem::is_doubled | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_10u
Definition at line 162 of file sx_elem.cpp.
References dep(), casadi::SXNode::eq_depth_, is_equal(), is_op(), and casadi::OP_ADD.
Referenced by binary().
Extra doc: https://github.com/casadi/casadi/wiki/L_10z
Definition at line 529 of file sx_elem.cpp.
References get(), and casadi::SXNode::is_equal().
Referenced by assignIfDuplicate(), binary(), casadi::SXFunction::eval_sx(), is_doubled(), casadi::casadi_limits< SXElem >::is_equal(), casadi::BinarySX::is_equal(), and casadi::UnarySX::is_equal().
bool casadi::SXElem::is_inf | ( | ) | const |
Definition at line 509 of file sx_elem.cpp.
References casadi::SXNode::is_inf().
Referenced by binary(), casadi::casadi_limits< SXElem >::is_inf(), casadi::Matrix< Scalar >::is_regular(), and is_regular().
bool casadi::SXElem::is_integer | ( | ) | const |
Definition at line 481 of file sx_elem.cpp.
References casadi::SXNode::is_integer().
Referenced by casadi::casadi_limits< SXElem >::is_integer().
bool casadi::SXElem::is_leaf | ( | ) | const |
An SXElem qualifies as leaf when it has no dependencies.
Extra doc: https://github.com/casadi/casadi/wiki/L_10r
Definition at line 447 of file sx_elem.cpp.
References is_constant(), and is_symbolic().
bool casadi::SXElem::is_minus_inf | ( | ) | const |
Definition at line 513 of file sx_elem.cpp.
References casadi::SXNode::is_minus_inf().
Referenced by binary(), casadi::casadi_limits< SXElem >::is_minus_inf(), casadi::Matrix< Scalar >::is_regular(), and is_regular().
bool casadi::SXElem::is_minus_one | ( | ) | const |
Definition at line 501 of file sx_elem.cpp.
References casadi::SXNode::is_minus_one().
Referenced by binary(), casadi::casadi_limits< SXElem >::is_minus_one(), and operator-().
bool casadi::SXElem::is_nan | ( | ) | const |
Definition at line 505 of file sx_elem.cpp.
References casadi::SXNode::is_nan().
Referenced by casadi::casadi_limits< SXElem >::is_nan(), casadi::Matrix< Scalar >::is_regular(), and is_regular().
bool casadi::SXElem::is_nonnegative | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_10t
Definition at line 540 of file sx_elem.cpp.
References is_constant(), is_op(), casadi::OP_FABS, and casadi::OP_SQ.
Referenced by binary().
|
inline |
Extra doc: https://github.com/casadi/casadi/wiki/L_112
Definition at line 280 of file sx_elem.hpp.
bool casadi::SXElem::is_one | ( | ) | const |
Definition at line 497 of file sx_elem.cpp.
References casadi::SXNode::is_one().
Referenced by binary(), casadi::casadi_limits< SXElem >::is_one(), and operator-().
bool casadi::SXElem::is_op | ( | casadi_int | op | ) | const |
Definition at line 525 of file sx_elem.cpp.
References casadi::SXNode::is_op(), and op().
Referenced by binary(), inv(), is_doubled(), is_nonnegative(), operator-(), and unary().
bool casadi::SXElem::is_output | ( | ) | const |
Definition at line 465 of file sx_elem.cpp.
References casadi::SXNode::is_output().
bool casadi::SXElem::is_regular | ( | ) | const |
Definition at line 647 of file sx_elem.cpp.
References is_constant(), is_inf(), is_minus_inf(), and is_nan().
bool casadi::SXElem::is_symbolic | ( | ) | const |
Definition at line 485 of file sx_elem.cpp.
References casadi::SXNode::is_symbolic().
Referenced by is_leaf(), and casadi::register_symbol().
bool casadi::SXElem::is_zero | ( | ) | const |
Definition at line 489 of file sx_elem.cpp.
References casadi::SXNode::is_zero().
Referenced by __nonzero__(), binary(), casadi::casadi_limits< SXElem >::is_zero(), operator-(), and unary().
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_os
Definition at line 146 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_pg
Definition at line 470 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_ph
Definition at line 482 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_pi
Definition at line 494 of file generic_expression.hpp.
|
inlinestaticinherited |
Returns (an expression evaluating to) 1 if both expressions are nonzero and 0 otherwise
Extra doc: https://github.com/casadi/casadi/wiki/L_ox
Definition at line 224 of file generic_expression.hpp.
|
inlinestaticinherited |
Returns (an expression evaluating to) 1 if expression is zero and 0 otherwise
Extra doc: https://github.com/casadi/casadi/wiki/L_oz
Definition at line 260 of file generic_expression.hpp.
|
inlinestaticinherited |
returns (an expression evaluating to) 1 if at least one expression is nonzero and 0 otherwise
Extra doc: https://github.com/casadi/casadi/wiki/L_oy
Definition at line 242 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_or
Definition at line 131 of file generic_expression.hpp.
void casadi::SXElem::mark | ( | ) | const |
Definition at line 643 of file sx_elem.cpp.
bool casadi::SXElem::marked | ( | ) | const |
Definition at line 639 of file sx_elem.cpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_oo
Definition at line 83 of file generic_expression.hpp.
|
inlinestaticinherited |
This Function follows the convention of https://en.cppreference.com/w/c/numeric/math/fmod
Notably:
This is equivalent to Python's numpy.fmod and Matlab's rem.
\seealso remainder
Extra doc: https://github.com/casadi/casadi/wiki/L_pq
Definition at line 607 of file generic_expression.hpp.
casadi_int casadi::SXElem::n_dep | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_10v
Definition at line 563 of file sx_elem.cpp.
References casadi::SXNode::n_dep().
Referenced by dep(), and is_commutative().
const std::string & casadi::SXElem::name | ( | ) | const |
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_ow
Definition at line 206 of file generic_expression.hpp.
casadi_int casadi::SXElem::op | ( | ) | const |
Definition at line 521 of file sx_elem.cpp.
References casadi::SXNode::op().
Referenced by binary(), is_commutative(), is_op(), and unary().
|
explicit |
Definition at line 554 of file sx_elem.cpp.
|
explicit |
Definition at line 550 of file sx_elem.cpp.
|
inlineinherited |
Returns (an expression evaluating to) 1 if expression is zero and 0 otherwise
Extra doc: https://github.com/casadi/casadi/wiki/L_oz
Definition at line 266 of file generic_expression.hpp.
|
inlineinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_op
Definition at line 108 of file generic_expression.hpp.
|
inlineinherited |
Definition at line 76 of file generic_expression.hpp.
SXElem casadi::SXElem::operator- | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_10x
Definition at line 144 of file sx_elem.cpp.
References casadi::UnarySX::create(), dep(), is_minus_one(), is_one(), is_op(), is_zero(), and casadi::OP_NEG.
|
inlineinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_oo
Definition at line 92 of file generic_expression.hpp.
SXNode * casadi::SXElem::operator-> | ( | ) |
Definition at line 182 of file sx_elem.cpp.
const SXNode * casadi::SXElem::operator-> | ( | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_10o
Definition at line 178 of file sx_elem.cpp.
|
inlineinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_oq
Definition at line 124 of file generic_expression.hpp.
SXElem & casadi::SXElem::operator= | ( | double | scalar | ) |
Definition at line 136 of file sx_elem.cpp.
References SXElem().
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_on
Definition at line 67 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_pp
Definition at line 583 of file generic_expression.hpp.
|
inlinestaticinherited |
Debug printing
Definition at line 730 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_oq
Definition at line 115 of file generic_expression.hpp.
|
inlinestaticinherited |
This Function follows the convention of https://en.cppreference.com/w/c/numeric/math/remainder
Notably:
This is equivalent to Python's math.remainder. There is no equivalence in Matlab.
\seealso fmod
Extra doc: https://github.com/casadi/casadi/wiki/L_24x
Definition at line 634 of file generic_expression.hpp.
|
inlineprotectedinherited |
Definition at line 55 of file generic_expression.hpp.
|
inlineprotectedinherited |
Definition at line 54 of file generic_expression.hpp.
void casadi::SXElem::serialize | ( | SerializingStream & | s | ) | const |
Extra doc: https://github.com/casadi/casadi/wiki/L_114
Definition at line 655 of file sx_elem.cpp.
void casadi::SXElem::set_temp | ( | int | t | ) | const |
Definition at line 635 of file sx_elem.cpp.
|
inlinestaticinherited |
sign(x) := -1 for x<0 sign(x) := 1 for x>0, sign(0) := 0 sign(NaN) := NaN
Extra doc: https://github.com/casadi/casadi/wiki/L_po
Definition at line 571 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_p3
Definition at line 314 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_pa
Definition at line 398 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_p2
Definition at line 302 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_p1
Definition at line 290 of file generic_expression.hpp.
|
static |
name | Name of the symbolic primitive |
This is the name that will be used by the "operator<<" and "str" methods. The name is not used as identifier; you may construct distinct SXElem objects with non-unique names.
Extra doc: https://github.com/casadi/casadi/wiki/L_10l
Definition at line 90 of file sx_elem.cpp.
References create(), and name().
Referenced by casadi::Matrix< Scalar >::_sym(), and casadi::register_symbol().
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_p5
Definition at line 338 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_p9
Definition at line 386 of file generic_expression.hpp.
|
inlinestaticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_op
Definition at line 99 of file generic_expression.hpp.
|
inlinestatic |
Definition at line 135 of file sx_elem.hpp.
Definition at line 408 of file sx_elem.cpp.
References casadi::UnarySX::create(), dep(), casadi::GenericExpression< SXElem >::fabs, is_op(), is_zero(), op(), casadi::OP_ACOSH, casadi::OP_ASINH, casadi::OP_ATANH, casadi::OP_COSH, casadi::OP_FABS, casadi::OP_NEG, casadi::OP_NOT, casadi::OP_SINH, casadi::OP_SQ, casadi::OP_SQRT, casadi::OP_TANH, casadi::GlobalOptions::simplification_on_the_fly, and casadi::GenericExpression< SXElem >::sq().
Function casadi::SXElem::which_function | ( | ) | const |
Definition at line 473 of file sx_elem.cpp.
References casadi::SXNode::which_function().
casadi_int casadi::SXElem::which_output | ( | ) | const |
Definition at line 477 of file sx_elem.cpp.
References casadi::SXNode::which_output().
|
friend |
Definition at line 77 of file sx_elem.hpp.
Extra doc: https://github.com/casadi/casadi/wiki/L_113
Definition at line 285 of file sx_elem.hpp.
Definition at line 77 of file sx_elem.hpp.
|
friend |
Definition at line 76 of file sx_elem.hpp.