Commit 1ce9826e authored by Guilhem Saurel's avatar Guilhem Saurel Committed by Anthony Mallet
Browse files

[optimization/roboptim-core] Update to 3.1

Changes since 3.0:

* ColMajor/RowMajor support has been improved (cf. %89). Default is back to
  ColMajor since this is Eigen's default mode, but that can be changed with a
  CMake variable.
* Allocation checking has been improved (cf. %92).
* Multiplots are now available with the matplotlib plotting backend (cf. %94).
* Added vector_t and bool to the solver parameter types. As a consequence,
  std::string parameters should not rely on automatic conversion from const
  char* (cf. 7a0bbb7).
* Renamed scale[s]* to scaling* (cf. 434559c). Previous methods/typedefs are
  currently kept for backward compatibility, but marked as deprecated.
* Add new StructuredInput helper (cf. %96).
* Add support for matrix plotting with matplotlib (cf. 5abd27e / af48e9b).

Changes since 2.0:

* 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

Changes since 1.0:

The version 2.0 of roboptim-core now depends on Eigen for matrix computations
by default.
Traits allow the user to use its own type. Support for Eigen dense and sparse
matrices is built-in.
parent 71364df7
......@@ -2,11 +2,12 @@
# Created: florent@laas.fr on Tue, 28 Apr 2009
#
VERSION= 1.0
PKGREVISION= 3
DISTNAME= roboptim-core-${VERSION}
MASTER_SITES= ${MASTER_SITE_OPENROBOTS:=roboptim/}
MASTER_REPOSITORY=git git://github.com/roboptim/roboptim-core.git
VERSION= 3.1
PACKAGE= roboptim-core
DISTNAME= ${PACKAGE}-${VERSION}
MASTER_SITES=\
${MASTER_SITE_GITHUB:=roboptim/${PACKAGE}/releases/download/v${VERSION}/}
MASTER_REPOSITORY=git git://github.com/roboptim/${PACKAGE}.git
CATEGORIES= optimization
COMMENT= Optimization for robotics: common API to various solvers
......@@ -22,19 +23,17 @@ INCLUDE_DIRS.libtool-ltdl= include
LIBRARY_DIRS.libtool-ltdl= lib
RPATH_DIRS.libtool-ltdl= lib
# Make sure git-version-gen is not confused by the robotpkg ``.git''
# directory.
BUILD_MAKE_FLAGS+= GIT_DIR=/dev/null
DEPEND_ABI.eigen3+= eigen3>=3.2.0
DEPEND_ABI.g++ += g++>=4.6
# --------------------------------------------------------------------
include ../../mk/sysdep/cmake.mk
include ../../pkgtools/pkg-config/depend.mk
include ../../devel/boost-headers/depend.mk
include ../../devel/boost-libs/depend.mk
include ../../mk/sysdep/libtool-ltdl.mk
include ../../math/eigen3/depend.mk
include ../../pkgtools/pkg-config/depend.mk
include ../../mk/sysdep/cmake.mk
include ../../mk/sysdep/doxygen.mk
include ../../mk/sysdep/latex.mk
include ../../mk/sysdep/libtool-ltdl.mk
include ../../mk/language/c.mk
include ../../mk/language/c++.mk
include ../../mk/robotpkg.mk
@comment Tue May 17 14:47:28 CEST 2016
@comment Thu Mar 22 16:09:56 CET 2018
include/roboptim/core.hh
include/roboptim/core/alloc.hh
include/roboptim/core/cache.hh
include/roboptim/core/cache.hxx
include/roboptim/core/callback/multiplexer.hh
include/roboptim/core/callback/multiplexer.hxx
include/roboptim/core/config.h
include/roboptim/core/config.hh
include/roboptim/core/constant-function.hh
include/roboptim/core/debug.hh
include/roboptim/core/decorator/cached-function.hh
include/roboptim/core/decorator/cached-function.hxx
include/roboptim/core/decorator/finite-difference-gradient.hh
include/roboptim/core/decorator/finite-difference-gradient.hxx
include/roboptim/core/deprecated.hh
include/roboptim/core/derivable-function.hh
include/roboptim/core/derivable-parametrized-function.hh
include/roboptim/core/derivative-size.hh
include/roboptim/core/detail/autopromote.hh
include/roboptim/core/detail/structured-input.hh
include/roboptim/core/detail/structured-input.hxx
include/roboptim/core/detail/utility.hh
include/roboptim/core/differentiable-function.hh
include/roboptim/core/filter/cached-function.hh
include/roboptim/core/filter/cached-function.hxx
include/roboptim/core/filter/split.hh
include/roboptim/core/filter/split.hxx
include/roboptim/core/differentiable-function.hxx
include/roboptim/core/finite-difference-gradient.hh
include/roboptim/core/finite-difference-gradient.hxx
include/roboptim/core/function-pool.hh
include/roboptim/core/function-pool.hxx
include/roboptim/core/function.hh
include/roboptim/core/function/constant.hh
include/roboptim/core/function/cos.hh
include/roboptim/core/function/identity.hh
include/roboptim/core/function/polynomial.hh
include/roboptim/core/function/polynomial.hxx
include/roboptim/core/function/sin.hh
include/roboptim/core/fwd.hh
include/roboptim/core/generic-solver.hh
include/roboptim/core/identity-function.hh
include/roboptim/core/indent.hh
include/roboptim/core/io.hh
include/roboptim/core/linear-function.hh
include/roboptim/core/linear-function.hxx
include/roboptim/core/n-times-derivable-function.hh
include/roboptim/core/n-times-derivable-function.hxx
include/roboptim/core/numeric-linear-function.hh
include/roboptim/core/numeric-linear-function.hxx
include/roboptim/core/numeric-quadratic-function.hh
include/roboptim/core/numeric-quadratic-function.hxx
include/roboptim/core/operator/bind.hh
include/roboptim/core/operator/bind.hxx
include/roboptim/core/operator/chain.hh
include/roboptim/core/operator/chain.hxx
include/roboptim/core/operator/concatenate.hh
include/roboptim/core/operator/concatenate.hxx
include/roboptim/core/operator/derivative.hh
include/roboptim/core/operator/map.hh
include/roboptim/core/operator/map.hxx
include/roboptim/core/operator/minus.hh
include/roboptim/core/operator/minus.hxx
include/roboptim/core/operator/plus.hh
include/roboptim/core/operator/plus.hxx
include/roboptim/core/operator/product.hh
include/roboptim/core/operator/product.hxx
include/roboptim/core/operator/scalar.hh
include/roboptim/core/operator/scalar.hxx
include/roboptim/core/operator/selection-by-id.hh
include/roboptim/core/operator/selection-by-id.hxx
include/roboptim/core/operator/selection.hh
include/roboptim/core/operator/selection.hxx
include/roboptim/core/operator/split.hh
include/roboptim/core/operator/split.hxx
include/roboptim/core/optimization-logger.hh
include/roboptim/core/optimization-logger.hxx
include/roboptim/core/parametrized-function.hh
include/roboptim/core/parametrized-function.hxx
include/roboptim/core/plugin/dummy-laststate.hh
include/roboptim/core/plugin/dummy-laststate.hxx
include/roboptim/core/plugin/dummy-td.hh
include/roboptim/core/plugin/dummy.hh
include/roboptim/core/portability.hh
include/roboptim/core/problem.hh
include/roboptim/core/problem.hxx
include/roboptim/core/quadratic-function.hh
include/roboptim/core/quadratic-function.hxx
include/roboptim/core/result-with-warnings.hh
include/roboptim/core/result.hh
include/roboptim/core/solver-error.hh
include/roboptim/core/solver-factory.hh
include/roboptim/core/solver-factory.hxx
include/roboptim/core/solver-state.hh
include/roboptim/core/solver-state.hxx
include/roboptim/core/solver-warning.hh
include/roboptim/core/solver.hh
include/roboptim/core/solver.hxx
include/roboptim/core/sum-of-c1-squares.hh
include/roboptim/core/sum-of-c1-squares.hxx
include/roboptim/core/sys.hh
include/roboptim/core/terminal-color.hh
include/roboptim/core/twice-derivable-function.hh
include/roboptim/core/twice-differentiable-function.hh
include/roboptim/core/twice-differentiable-function.hxx
include/roboptim/core/util.hh
include/roboptim/core/util.hxx
include/roboptim/core/visualization/fwd.hh
include/roboptim/core/visualization/gnuplot-commands.hh
include/roboptim/core/visualization/gnuplot-differentiable-function.hh
include/roboptim/core/visualization/gnuplot-function.hh
include/roboptim/core/visualization/gnuplot-matrix.hh
include/roboptim/core/visualization/gnuplot.hh
include/roboptim/core/visualization/matplotlib-commands.hh
include/roboptim/core/visualization/matplotlib-function.hh
include/roboptim/core/visualization/matplotlib-matrix.hh
include/roboptim/core/visualization/matplotlib.hh
include/roboptim/core/warning.hh
lib/libroboptim-core.so
lib/libroboptim-core.so.1.${PKGVERSION}
lib/libroboptim-core.so.3
lib/libroboptim-core.so.${PKGVERSION}.0
lib/pkgconfig/roboptim-core.pc
lib/roboptim-core/roboptim-core-plugin-dummy-d-sparse-laststate.so
lib/roboptim-core/roboptim-core-plugin-dummy-laststate.so
lib/roboptim-core/roboptim-core-plugin-dummy-td.so
lib/roboptim-core/roboptim-core-plugin-dummy.so
......@@ -3,24 +3,25 @@
#
DEPEND_DEPTH:= ${DEPEND_DEPTH}+
ROBOPTIM_CORE_DEPEND_MK:=${ROBOPTIM_CORE_DEPEND_MK}+
ROBOPTIM_CORE_DEPEND_MK:= ${ROBOPTIM_CORE_DEPEND_MK}+
ifeq (+,$(DEPEND_DEPTH))
DEPEND_PKG+= roboptim-core
endif
ifeq (+,$(ROBOPTIM_CORE_DEPEND_MK)) # ------------------------------
ifeq (+,$(ROBOPTIM_CORE_DEPEND_MK)) # --------------------------------------
PREFER.roboptim-core?= robotpkg
PREFER.roboptim-core?= robotpkg
DEPEND_USE+= roboptim-core
DEPEND_ABI.roboptim-core?= roboptim-core>=0.4
DEPEND_ABI.roboptim-core?= roboptim-core>=3.1
DEPEND_DIR.roboptim-core?= ../../optimization/roboptim-core
SYSTEM_SEARCH.roboptim-core=\
include/roboptim/core/fwd.hh \
'lib/pkgconfig/roboptim-core.pc:/Version/s/[^0-9.]//gp'
'include/roboptim/core/fwd.hh' \
'lib/libroboptim-core.so' \
'lib/pkgconfig/roboptim-core.pc:/Version/s/[^0-9.]//gp'
endif # --------------------------------------------------------------------
......
SHA1 (roboptim-core-1.0.tar.gz) = 4f1aad67079ebd19551b0366f244745c4e1d6dcf
RMD160 (roboptim-core-1.0.tar.gz) = 726f651673c751d997e2bf39db23e6ed2db7cc22
Size (roboptim-core-1.0.tar.gz) = 154780 bytes
SHA1 (patch-aa) = b443ddd1bbe4ea0052118828eb1f6a5c2b5a30ab
SHA1 (patch-ab) = db9655e4183dc45873a334e35064421632ae4f9b
SHA1 (patch-ac) = b4293487a6f4121b2a83dd71ad7d9f772b5a76d2
SHA1 (patch-ad) = c0fcd5713fca1352fa4e9ccf07c19319f2171ea5
SHA1 (patch-af) = 9461d3fe1d1f9f984d94a4865250d85575c355a0
SHA1 (patch-ag) = 8d0ffcaa9347925e5bc23d32f0963e121ed886b7
SHA1 (patch-ah) = 93ede480e268985f1e22cc737efda5779f3bfcea
SHA1 (patch-ai) = 15e92394bffb6da09cd7b9c79bee01d96ec86d57
SHA1 (patch-aj) = 5ab9fd8d8993e2541f4e220d56f2f1376f7cea86
SHA1 (patch-ak) = 22361851f24e1515d9f680079b7cb81c1e2eb937
SHA1 (patch-al) = be0d69015dce5f1740bb4d51151b4efe7401afdc
SHA1 (patch-am) = c879da0f5d418d249fbe1e9a998adf8439c50173
SHA1 (patch-an) = 892e43559c3d7000d31a4fa683ce361b2581eb41
SHA1 (roboptim-core-3.1.tar.gz) = 5833c4cfd71ea5858bce6c1a49800613d37ef342
RMD160 (roboptim-core-3.1.tar.gz) = 7e15b0b4c5d62144eca87ab5c808004e48b3777c
Size (roboptim-core-3.1.tar.gz) = 394921 bytes
--- include/roboptim/core/parametrized-function.hh~ 2012-01-30 21:32:43.000000000 +0100
+++ include/roboptim/core/parametrized-function.hh 2012-02-01 14:15:01.000000000 +0100
@@ -108,6 +108,7 @@
ParametrizedFunction (size_type inputSize,
size_type functionInputSize,
size_type functionOutputSize) throw ();
+ virtual ~ParametrizedFunction() {};
/// \brief Function evaluation.
///
Fix for -Werror on x86_64
--- include/roboptim/core/finite-difference-gradient.hh~ 2012-01-30 21:32:43.000000000 +0100
+++ include/roboptim/core/finite-difference-gradient.hh 2012-02-13 10:35:21.450198318 +0100
@@ -73,7 +73,7 @@
value_type maxDelta_;
/// \brief Component containing the maximum error.
- value_type maxDeltaComponent_;
+ size_type maxDeltaComponent_;
/// \brief Allowed threshold.
value_type threshold_;
Fix for -Werror on x86_64
--- src/finite-difference-gradient.cc~ 2012-01-30 21:32:43.000000000 +0100
+++ src/finite-difference-gradient.cc 2012-02-13 10:49:50.355124728 +0100
@@ -81,7 +81,7 @@
{
ROBOPTIM_DLLLOCAL void
compute_deriv (const Function& adaptee,
- unsigned j,
+ Function::size_type j,
double h,
double& result,
double& round,
@@ -92,7 +92,7 @@
/// Algorithm from the Gnu Scientific Library.
ROBOPTIM_DLLLOCAL void
compute_deriv (const Function& adaptee,
- unsigned j,
+ Function::size_type j,
double h,
double& result,
double& round,
Fix for -Werror on x86_64
--- src/indent.cc~ 2012-01-30 21:32:43.000000000 +0100
+++ src/indent.cc 2012-02-13 11:01:39.955796816 +0100
@@ -28,7 +28,7 @@
inline long int& indent (std::ostream& o)
{
// The slot to store the current indentation level.
- static const long int indent_index = std::ios::xalloc ();
+ static const int indent_index = std::ios::xalloc ();
return o.iword (indent_index);
}
@@ -56,7 +56,7 @@
o << std::endl;
// Be sure to be able to restore the stream flags.
char fill = o.fill (' ');
- return o << std::setw (indent (o))
+ return o << std::setw ((int)indent (o))
<< ""
<< std::setfill (fill);
}
Fix for -Werror on x86_64
--- include/roboptim/core/filter/split.hxx~ 2012-01-30 21:32:43.000000000 +0100
+++ include/roboptim/core/filter/split.hxx 2012-02-13 11:40:12.904504062 +0100
@@ -29,7 +29,7 @@
std::string splitName (const T& fct);
template <typename T>
- std::string splitName (const T& fct, unsigned functionId)
+ std::string splitName (const T& fct, typename Split<T>::size_type functionId)
{
boost::format fmt ("%1% (split, function Id = %2%)");
fmt % fct.getName () % functionId;
Fix for -Werror on x86_64
--- include/roboptim/core/function.hh~ 2012-01-30 21:32:43.000000000 +0100
+++ include/roboptim/core/function.hh 2012-02-13 11:43:20.841982297 +0100
@@ -252,7 +252,7 @@
for (size_type i = 0; i <= n; ++i)
{
value_type t =
- getLowerBound (interval) + i * getStep (interval);
+ getLowerBound (interval) + (value_type)i * getStep (interval);
if (t > getUpperBound (interval))
t = getUpperBound (interval);
assert (getLowerBound (interval) <= t
Fix for -Werror on x86_64
--- include/roboptim/core/filter/split.hh~ 2012-01-30 21:32:43.000000000 +0100
+++ include/roboptim/core/filter/split.hh 2012-02-13 11:45:14.550422332 +0100
@@ -77,7 +77,7 @@
private:
boost::shared_ptr<const T> function_;
- unsigned functionId_;
+ size_type functionId_;
};
template <typename P, typename C>
Fix for -Werror on x86_64
--- tests/split.cc~ 2012-01-30 21:32:43.000000000 +0100
+++ tests/split.cc 2012-02-13 11:48:38.917550225 +0100
@@ -37,14 +37,14 @@
{
res.clear ();
for (size_type i = 0; i < outputSize (); ++i)
- res[i] = i * argument[0];
+ res[i] = (value_type)i * argument[0];
}
void impl_gradient (gradient_t& grad, const argument_t&,
size_type functionId) const throw ()
{
grad.clear ();
- grad[0] = functionId;
+ grad[0] = (value_type)functionId;
}
};
Fix for -Werror on x86_64
--- include/roboptim/core/function.hh~ 2012-02-13 12:30:06.568748508 +0100
+++ include/roboptim/core/function.hh 2012-02-13 12:31:20.738767689 +0100
@@ -283,7 +283,7 @@
for (size_type i = 0; i < n; ++i)
{
value_type t =
- getLowerBound (interval) + i * (delta / (n - 1));
+ getLowerBound (interval) + (value_type)i * (delta / ((value_type)n - 1));
if (t > getUpperBound (interval))
t = getUpperBound (interval);
assert (getLowerBound (interval) <= t
Use cmake's idea of the "make" program, so that it can be tuned by robotpkg
https://github.com/jrl-umi3218/jrl-cmakemodules/issues/34
--- cmake/doxygen.cmake~ 2013-07-30 19:48:34.000000000 +0200
+++ cmake/doxygen.cmake 2013-12-14 18:26:08.000000000 +0100
@@ -66,7 +66,7 @@
COMMENT "Generating Doxygen documentation"
)
- INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${MAKE} doc)")
+ INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_MAKE_PROGRAM} doc)")
ENDIF(MSVC)
ADD_CUSTOM_COMMAND(
Fix for boost-1.58.0
See https://github.com/boostorg/variant/commit/b50826821682396e7a334b3da67c423ffc3f9719
--- include/roboptim/core/generic-solver.hh~ 2012-01-30 21:32:43.000000000 +0100
+++ include/roboptim/core/generic-solver.hh 2015-12-07 11:37:15.678941910 +0100
@@ -1,4 +1,4 @@
-// Copyright (C) 2009 by Thomas Moulard, AIST, CNRS, INRIA.
+// Copyright (C) 2009,2015 by Thomas Moulard, AIST, CNRS, INRIA.
//
// This file is part of the roboptim.
//
@@ -22,6 +22,11 @@
# include <stdexcept>
+# include <boost/version.hpp>
+# if BOOST_VERSION >= 105800 && BOOST_VERSION < 105900
+ /* boost-1.58.0 is missing this #include in variant/get.hpp */
+# include <boost/type_traits/remove_cv.hpp>
+# endif
# include <boost/variant/get.hpp>
# include <boost/variant/variant.hpp>
# include <boost/utility.hpp>
Diff finished. Mon Dec 7 11:37:22 2015
Disable SOVERSION on a module. cmake>=3.4 does not honor it anymore, and this
breaks the PLIST depending on cmake version.
--- src/CMakeLists.txt~ 2012-01-30 21:32:43.000000000 +0100
+++ src/CMakeLists.txt 2016-05-17 14:42:48.895675579 +0200
@@ -59,6 +59,5 @@
ADD_DEPENDENCIES(roboptim-core-plugin-dummy roboptim-core)
TARGET_LINK_LIBRARIES(roboptim-core-plugin-dummy roboptim-core)
SET_TARGET_PROPERTIES(roboptim-core-plugin-dummy PROPERTIES
- PREFIX ""
- SOVERSION 1.1.0)
+ PREFIX "")
INSTALL(TARGETS roboptim-core-plugin-dummy DESTINATION ${PLUGINDIR})
Fix a typo that was ignored before gcc-6
--- include/roboptim/core/solver-factory.hxx~ 2012-01-30 21:32:43.000000000 +0100
+++ include/roboptim/core/solver-factory.hxx 2016-11-02 18:11:41.493314048 +0100
@@ -143,7 +143,7 @@
std::stringstream sserror;
sserror << "libltdl failed to close plug-in: "
<< lt_dlerror ();
- std::cerr << sserror << std::endl;
+ std::cerr << sserror.str() << std::endl;
}
if (lt_dlexit ())
@@ -151,7 +151,7 @@
std::stringstream sserror;
sserror << "libltdl failed to call ``create'': "
<< lt_dlerror ();
- std::cerr << sserror << std::endl;
+ std::cerr << sserror.str() << std::endl;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment