You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which will take the expression e, call get_args on it, and return the n-th argument as an expression.
The SymEngine's getargs are slow anyway, since it returns std::vector<Basic> and internally SymEngine does not store the arguments in a vector, and so it must construct it (slow). Consequently, the SymbolicGetArg will be slow as well. We can start by using basic_get_args, implemented in SymEngine as:
Let's create
SymbolicGetArg(expr e, int n)
:Which will take the expression
e
, call get_args on it, and return then
-th argument as an expression.The SymEngine's getargs are slow anyway, since it returns
std::vector<Basic>
and internally SymEngine does not store the arguments in a vector, and so it must construct it (slow). Consequently, theSymbolicGetArg
will be slow as well. We can start by usingbasic_get_args
, implemented in SymEngine as:and then extract the
n
-th argument usingvecbasic_get
, implemented as:The text was updated successfully, but these errors were encountered: