50 f[0] = x*x +
pow(y,3);
80 double *ff =
new double[f.
getDim()];
81 double *df =
new double[f.
getDim()];
97 <<
" x = " << xx[x_index] << endl
98 <<
" y = " << xx[y_index] << endl
99 <<
"seed_x = " << seed[x_index] << endl
100 <<
"seed_y = " << seed[y_index] << endl
101 <<
" f = " << ff[0] << endl
102 <<
" df = " << df[0] << endl;
Allows to setup and evaluate a general function based on SymbolicExpressions.
USING_NAMESPACE_ACADO void my_function(double *x_, double *f, void *user_data)
#define USING_NAMESPACE_ACADO
DVector evaluate(const EvaluationPoint &x, const int &number=0)
IntermediateState pow(const Expression &arg1, const Expression &arg2)
int index(VariableType variableType_, int index_) const
DVector AD_forward(const EvaluationPoint &x, const int &number=0)
int getNumberOfVariables() const