#include <call_sx.hpp>
Definition at line 42 of file call_sx.hpp.
Public Member Functions | |
~CallSX () override | |
Destructor. More... | |
std::string | class_name () const override |
Get type name. More... | |
bool | is_op (casadi_int op) const override |
check properties of a node More... | |
casadi_int | n_dep () const override |
Number of dependencies. More... | |
SXElem | get_output (casadi_int oind) const override |
Get an output. More... | |
const SXElem & | dep (casadi_int i) const override |
get the reference of a dependency More... | |
SXElem & | dep (casadi_int i) override |
get the reference of a child More... | |
casadi_int | op () const override |
Get the operation. More... | |
bool | is_call () const override |
Check if call node. More... | |
bool | has_output () const override |
Check if a multiple output node. More... | |
Function | which_function () const override |
Get function. More... | |
std::string | print (const std::string &arg1, const std::string &arg2) const override |
Print expression. More... | |
void | serialize_node (SerializingStream &s) const override |
virtual const std::string & | name () const |
virtual casadi_int | which_output () const |
Get function output. More... | |
virtual bool | is_equal (const SXNode *node, casadi_int depth) const |
Check if two nodes are equivalent up to a given depth. More... | |
virtual bool | is_smooth () const |
Check if smooth. More... | |
virtual void | disp (std::ostream &stream, bool more) const |
print More... | |
void | can_inline (std::map< const SXNode *, casadi_int > &nodeind) const |
Find out which nodes can be inlined. More... | |
std::string | print_compact (std::map< const SXNode *, casadi_int > &nodeind, std::vector< std::string > &intermed) const |
Print compact. More... | |
bool | marked () const |
void | mark () const |
SXElem | shared_from_this () |
Get a shared object from the current internal object. More... | |
const SXElem | shared_from_this () const |
Get a shared object from the current internal object. More... | |
void | serialize (SerializingStream &s) const |
Serialize an object. More... | |
virtual bool | is_constant () const |
check properties of a node More... | |
virtual bool | is_integer () const |
check properties of a node More... | |
virtual bool | is_symbolic () const |
check properties of a node More... | |
virtual bool | is_zero () const |
check properties of a node More... | |
virtual bool | is_almost_zero (double tol) const |
check properties of a node More... | |
virtual bool | is_one () const |
check properties of a node More... | |
virtual bool | is_minus_one () const |
check properties of a node More... | |
virtual bool | is_nan () const |
check properties of a node More... | |
virtual bool | is_inf () const |
check properties of a node More... | |
virtual bool | is_minus_inf () const |
check properties of a node More... | |
virtual bool | is_output () const |
check properties of a node More... | |
virtual double | to_double () const |
Get value of a constant node. More... | |
virtual casadi_int | to_int () const |
Get value of a constant node. More... | |
Static Public Member Functions | |
static SXElem | create (const Function &f, const std::vector< SXElem > &dep) |
Create a binary expression. More... | |
static int | eval_sx (const Function &f, const SXElem **arg, SXElem **res) |
static SXNode * | deserialize (DeserializingStream &s) |
static void | safe_delete (SXNode *n) |
Non-recursive delete. More... | |
Public Attributes | |
Function | f_ |
std::vector< SXElem > | dep_ |
The dependencies of the node. More... | |
int | temp |
unsigned int | count |
Static Public Attributes | |
static casadi_int | eq_depth_ = 1 |
static std::map< casadi_int, SXNode *(*)(DeserializingStream &)> | deserialize_map |
|
inlineoverride |
This is a rather complex destructor which is necessary since the default destructor can cause stack overflow due to recursive calling.
Extra doc: https://github.com/casadi/casadi/wiki/L_28q
Definition at line 88 of file call_sx.hpp.
|
inherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_a6
Definition at line 113 of file sx_node.cpp.
References casadi::SXNode::can_inline(), casadi::SXNode::dep(), casadi::SXNode::n_dep(), casadi::SXNode::op(), and casadi::OP_PARAMETER.
Referenced by casadi::SXNode::can_inline(), and casadi::SXNode::disp().
|
inlineoverridevirtual |
Extra doc: https://github.com/casadi/casadi/wiki/L_9y
Implements casadi::SXNode.
Definition at line 94 of file call_sx.hpp.
|
inlinestatic |
Extra doc: https://github.com/casadi/casadi/wiki/L_28p
Definition at line 57 of file call_sx.hpp.
References casadi::SXElem::create(), casadi::Function::nnz_in(), and casadi::str().
Referenced by casadi::SXElem::call().
|
inlineoverridevirtual |
Extra doc: https://github.com/casadi/casadi/wiki/L_28t
Reimplemented from casadi::SXNode.
Definition at line 119 of file call_sx.hpp.
Referenced by casadi::SXFunction::ad_forward(), and casadi::SXFunction::ad_reverse().
|
inlineoverridevirtual |
Extra doc: https://github.com/casadi/casadi/wiki/L_a3
Reimplemented from casadi::SXNode.
Definition at line 120 of file call_sx.hpp.
|
inlinestatic |
|
virtualinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_a5
Definition at line 88 of file sx_node.cpp.
References casadi::SXNode::can_inline(), and casadi::SXNode::print_compact().
Referenced by casadi::SXElem::disp().
|
inlinestatic |
Definition at line 63 of file call_sx.hpp.
References casadi::SXElem::call(), casadi::casadi_copy(), casadi::get_ptr(), casadi::Function::n_in(), casadi::Function::n_out(), casadi::Function::nnz_in(), and casadi::Function::nnz_out().
Referenced by casadi::FunctionInternal::eval_sx().
|
inlineoverridevirtual |
Extra doc: https://github.com/casadi/casadi/wiki/L_28s
Reimplemented from casadi::SXNode.
Definition at line 106 of file call_sx.hpp.
References casadi::SXElem::create(), casadi::GenericShared< Shared, Internal >::get(), casadi::WeakCache< K, T >::incache(), casadi::GenericShared< Shared, Internal >::own(), casadi::SXNode::shared_from_this(), and casadi::WeakCache< K, T >::tocache_if_missing().
Referenced by casadi::SXFunction::ad_forward(), and casadi::SXFunction::ad_reverse().
|
inlineoverridevirtual |
Extra doc: https://github.com/casadi/casadi/wiki/L_28w
Reimplemented from casadi::SXNode.
Definition at line 135 of file call_sx.hpp.
|
inlinevirtualinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_9w
Reimplemented in casadi::ZeroSX, and casadi::RealtypeSX.
Definition at line 74 of file sx_node.hpp.
Referenced by casadi::SXElem::is_almost_zero().
|
inlineoverridevirtual |
Extra doc: https://github.com/casadi/casadi/wiki/L_28v
Reimplemented from casadi::SXNode.
Definition at line 130 of file call_sx.hpp.
|
inlinevirtualinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_9w
Reimplemented in casadi::ConstantSX.
Definition at line 69 of file sx_node.hpp.
Referenced by casadi::SXElem::binary(), casadi::SXFunction::init(), and casadi::SXElem::is_constant().
|
virtualinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_a0
Reimplemented in casadi::UnarySX, casadi::ConstantSX, and casadi::BinarySX.
Definition at line 72 of file sx_node.cpp.
Referenced by casadi::SXElem::is_equal().
|
inlinevirtualinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_9w
Reimplemented in casadi::InfSX.
Definition at line 78 of file sx_node.hpp.
Referenced by casadi::SXElem::is_inf().
|
inlinevirtualinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_9w
Reimplemented in casadi::MinusOneSX, casadi::OneSX, casadi::ZeroSX, and casadi::IntegerSX.
Definition at line 70 of file sx_node.hpp.
Referenced by casadi::SXElem::binary(), and casadi::SXElem::is_integer().
|
inlinevirtualinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_9w
Reimplemented in casadi::MinusInfSX.
Definition at line 79 of file sx_node.hpp.
Referenced by casadi::SXElem::is_minus_inf().
|
inlinevirtualinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_9w
Reimplemented in casadi::MinusOneSX.
Definition at line 76 of file sx_node.hpp.
Referenced by casadi::SXElem::binary(), and casadi::SXElem::is_minus_one().
|
inlinevirtualinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_9w
Reimplemented in casadi::NanSX.
Definition at line 77 of file sx_node.hpp.
Referenced by casadi::SXElem::is_nan().
|
inlinevirtualinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_9w
Reimplemented in casadi::OneSX.
Definition at line 75 of file sx_node.hpp.
Referenced by casadi::SXElem::binary(), and casadi::SXElem::is_one().
|
inlineoverridevirtual |
Extra doc: https://github.com/casadi/casadi/wiki/L_9w
Reimplemented from casadi::SXNode.
Definition at line 96 of file call_sx.hpp.
References casadi::OP_CALL.
|
inlinevirtualinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_9w
Reimplemented in casadi::OutputSX.
Definition at line 81 of file sx_node.hpp.
Referenced by casadi::SXElem::is_output().
|
inlinevirtualinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_a4
Reimplemented in casadi::UnarySX, and casadi::BinarySX.
Definition at line 144 of file sx_node.hpp.
|
inlinevirtualinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_9w
Reimplemented in casadi::SymbolicSX.
Definition at line 71 of file sx_node.hpp.
Referenced by casadi::SXFunction::init(), and casadi::SXElem::is_symbolic().
|
inlinevirtualinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_9w
Reimplemented in casadi::ZeroSX.
Definition at line 72 of file sx_node.hpp.
Referenced by casadi::SXElem::binary(), and casadi::SXElem::is_zero().
|
inherited |
Definition at line 109 of file sx_node.cpp.
References casadi::SXNode::temp.
|
inherited |
Definition at line 105 of file sx_node.cpp.
References casadi::SXNode::temp.
|
inlineoverridevirtual |
Extra doc: https://github.com/casadi/casadi/wiki/L_28r
Reimplemented from casadi::SXNode.
Definition at line 101 of file call_sx.hpp.
|
virtualinherited |
Reimplemented in casadi::SymbolicSX.
Definition at line 76 of file sx_node.cpp.
References casadi::SXNode::class_name().
Referenced by casadi::SXElem::name().
|
inlineoverridevirtual |
Extra doc: https://github.com/casadi/casadi/wiki/L_28u
Implements casadi::SXNode.
Definition at line 125 of file call_sx.hpp.
References casadi::OP_CALL.
|
inlineoverridevirtual |
Extra doc: https://github.com/casadi/casadi/wiki/L_28y
Implements casadi::SXNode.
Definition at line 145 of file call_sx.hpp.
|
inherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_a7
Definition at line 130 of file sx_node.cpp.
References casadi::SXNode::dep(), casadi::SXNode::n_dep(), casadi::Function::n_in(), casadi::Function::name(), casadi::Function::nnz_in(), casadi::SXNode::op(), casadi::OP_CALL, casadi::SXNode::print(), casadi::SXNode::print_compact(), and casadi::SXNode::which_function().
Referenced by casadi::SXNode::disp(), and casadi::SXNode::print_compact().
|
staticinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_a9
Definition at line 184 of file sx_node.cpp.
References casadi::SXElem::assignNoDelete(), casadi::SXNode::count, casadi::SXNode::dep(), and casadi::SXNode::n_dep().
Referenced by casadi::BinarySX::~BinarySX(), and casadi::UnarySX::~UnarySX().
|
inherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_aa
Definition at line 238 of file sx_node.cpp.
References casadi::SXNode::op(), casadi::SerializingStream::pack(), and casadi::SXNode::serialize_node().
|
inlineoverridevirtual |
Reimplemented from casadi::SXNode.
Definition at line 156 of file call_sx.hpp.
References casadi::SerializingStream::pack().
|
inherited |
Definition at line 261 of file sx_node.cpp.
References casadi::SXNode::SXElem.
Referenced by casadi::SXNode::get_output(), and get_output().
|
inherited |
Definition at line 265 of file sx_node.cpp.
References casadi::SXNode::SXElem.
|
virtualinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_9x
Reimplemented in casadi::ConstantSX, casadi::NanSX, casadi::MinusInfSX, casadi::InfSX, casadi::MinusOneSX, casadi::OneSX, casadi::ZeroSX, casadi::IntegerSX, and casadi::RealtypeSX.
Definition at line 56 of file sx_node.cpp.
Referenced by casadi::SXElem::binary(), and casadi::SXFunction::init().
|
virtualinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_9x
Reimplemented in casadi::MinusOneSX, casadi::OneSX, casadi::ZeroSX, casadi::IntegerSX, and casadi::RealtypeSX.
Definition at line 60 of file sx_node.cpp.
References casadi::SXNode::class_name().
Referenced by casadi::SXElem::binary().
|
inlineoverridevirtual |
Extra doc: https://github.com/casadi/casadi/wiki/L_28x
Reimplemented from casadi::SXNode.
Definition at line 140 of file call_sx.hpp.
|
virtualinherited |
Extra doc: https://github.com/casadi/casadi/wiki/L_292
Reimplemented in casadi::OutputSX.
Definition at line 68 of file sx_node.cpp.
References casadi::SXNode::class_name().
Referenced by casadi::SXElem::which_output().
|
inherited |
Definition at line 197 of file sx_node.hpp.
Referenced by casadi::SXElem::assignNoDelete(), casadi::SXElem::operator=(), casadi::SXNode::safe_delete(), casadi::SXElem::SXElem(), casadi::SXNode::SXNode(), casadi::UniversalNodeOwner::UniversalNodeOwner(), casadi::InfSX::~InfSX(), casadi::MinusInfSX::~MinusInfSX(), casadi::MinusOneSX::~MinusOneSX(), casadi::NanSX::~NanSX(), casadi::OneSX::~OneSX(), casadi::SXElem::~SXElem(), casadi::SXNode::~SXNode(), and casadi::ZeroSX::~ZeroSX().
std::vector<SXElem> casadi::CallSX::dep_ |
Extra doc: https://github.com/casadi/casadi/wiki/L_28z
Definition at line 154 of file call_sx.hpp.
|
staticinherited |
Definition at line 209 of file sx_node.hpp.
Referenced by casadi::SXNode::deserialize().
|
staticinherited |
Definition at line 179 of file sx_node.hpp.
Referenced by casadi::SXElem::binary(), casadi::Matrix< Scalar >::get_max_depth(), casadi::SXElem::is_doubled(), and casadi::Matrix< Scalar >::set_max_depth().
Function casadi::CallSX::f_ |
Definition at line 149 of file call_sx.hpp.
|
mutableinherited |
Temporary variables to be used in user algorithms like sorting, the user is responsible of making sure that use is thread-safe The variable is initialized to zero
Definition at line 191 of file sx_node.hpp.
Referenced by casadi::SXFunction::init(), casadi::SXNode::mark(), casadi::SXNode::marked(), and casadi::SXNode::SXNode().