Skip to content

Release 3.0

Compare
Choose a tag to compare
@bchretien bchretien released this 24 Mar 11:31
· 367 commits to master since this release

Summary

New features:

  • Lots of new functions (cos, sin, etc.), operators (plus, minus, scalar, map, etc.) and decorators (cached function etc.),
  • Callback system (logger, callback multiplexer),
  • Simple Matplotlib support for visualization,
  • Function pools,
  • Set argument names (useful for plotting).

Improvements:

  • Support Eigen::Ref: now RobOptim functions accept blocks/segments of Eigen matrices as input,
  • Improved CachedFunction with LRU cache,
  • Automatic conversion of constraints/cost function types when creating problems,
  • Faster forward-difference rule for finite differences.

Other changes:

  • Removed exception specifiers (void function(...) throw())
  • Storage order was changed from Eigen's default (column-major) to row-major. The storage order is available in the GenericFunctionTraits (StorageOrder).
  • Move metaprogramming magic to roboptim/core/detail/utility.hh
  • Merge roboptim/core/visualization/util.hh with roboptim/core/util.hh

Migration from 2.0 to 3.0

  • Remove all the throw () exception specifiers
  • For Eigen::Ref support, a new API is used. For instance, for argument_t:

argument_t& ---> argument_ref
const argument_t& ---> const_argument_ref

Same goes for vector_t, matrix_t, result_t, gradient_t, jacobian_t and hessian_t.

For instance, the signature of impl_compute was:

void impl_compute (result_t& result, const argument_t& argument) const throw ();

Now, it is:

void impl_compute (result_ref result, const_argument_ref argument) const;

The reason behind this change is that we now use Eigen::Ref, and const references become const Eigen::Ref<const xxx_t>&, while references are Eigen::Ref<xxx_t>&. That way, we keep signatures simple, and using Eigen::Refs makes it possible to avoid both temporary allocations and extra copies, thus increasing RobOptim's performance. However, note that you SHOULD NOT use these typedefs as return types, since it would return references to temporary objects.