CppAD: A C++ Algorithmic Differentiation Package  20171217
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
template<class Base >
void CppAD::ADFun< Base >::optimize ( const std::string &  options = "")

Optimize a player object operation sequence.

The operation sequence for this object is replaced by one with fewer operations but the same funcition and derivative values.

Template Parameters
Basebase type for the operator; i.e., this operation was recorded using AD<Base> and computations by this routine are done using type Base.
  • If the sub-string "no_conditional_skip" appears, conditional skip operations will not be generated. This may make the optimize routine use significantly less memory and take significantly less time.
  • If the sub-string "no_compare_op" appears, then comparison operators will be removed from the optimized tape. These operators are necessary for the compare_change function to be be meaningful in the resulting recording. On the other hand, they are not necessary and take extra time when compare_change is not used.

Definition at line 216 of file optimize.hpp.

Referenced by CppAD::BenderQuad(), CppAD::opt_val_hes(), and CppAD::ipopt::solve_callback< Dvector, ADvector, FG_eval >::solve_callback().