[roboptim-commit] [SCM] roboptim-core branch, master, updated. v0.1-182-g92e7d2e
Status: Beta
Brought to you by:
flamiraux
From: Thomas M. <tho...@us...> - 2009-09-25 15:11:52
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim-core". The branch, master has been updated via 92e7d2eb17f3adf9b90ed8ff8293e015b9b181ea (commit) via 593c968ef145a470852973c5da00d9b720960ad3 (commit) via c2aa127153039eaf893a05ada752b735c7bd3af7 (commit) via 66e13be69793e1753cd128bc268d58563a3dbe4d (commit) from 81f5e42cdf833b7f93cf6947c57cf1ea6e978976 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 92e7d2eb17f3adf9b90ed8ff8293e015b9b181ea Author: Thomas Moulard <tho...@gm...> Date: Fri Sep 25 17:11:31 2009 +0200 Respect 80-columns rule. * include/roboptim/core/debug.hh, * include/roboptim/core/derivable-function.hh, * include/roboptim/core/finite-difference-gradient.hh, * include/roboptim/core/finite-difference-gradient.hxx, * include/roboptim/core/generic-solver.hh, * include/roboptim/core/n-times-derivable-function.hh, * include/roboptim/core/parametrized-function.hxx, * include/roboptim/core/problem.hxx, * include/roboptim/core/solver-error.hh, * include/roboptim/core/util.hh, * src/debug.cc, * src/doc.hh, * src/finite-difference-gradient.cc, * tests/Makefile.am, * tests/plugin.cc: Clean to make text fit on 80 columns. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 4f92510..dc14351 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,24 @@ 2009-09-25 Thomas Moulard <tho...@gm...> + Respect 80-columns rule. + * include/roboptim/core/debug.hh, + * include/roboptim/core/derivable-function.hh, + * include/roboptim/core/finite-difference-gradient.hh, + * include/roboptim/core/finite-difference-gradient.hxx, + * include/roboptim/core/generic-solver.hh, + * include/roboptim/core/n-times-derivable-function.hh, + * include/roboptim/core/parametrized-function.hxx, + * include/roboptim/core/problem.hxx, + * include/roboptim/core/solver-error.hh, + * include/roboptim/core/util.hh, + * src/debug.cc, + * src/doc.hh, + * src/finite-difference-gradient.cc, + * tests/Makefile.am, + * tests/plugin.cc: Clean to make text fit on 80 columns. + +2009-09-25 Thomas Moulard <tho...@gm...> + Simplify version updating in autotest.mk. * build-aux: Synchronize. * tests/atlocal.in: Simplify. diff --git a/include/roboptim/core/debug.hh b/include/roboptim/core/debug.hh index 847b3cf..a3779ed 100644 --- a/include/roboptim/core/debug.hh +++ b/include/roboptim/core/debug.hh @@ -75,6 +75,8 @@ namespace roboptim # define RoboptimCoreForAllDebugObjects(STATEMENT) \ LibcwdForAllDebugObjects(roboptim::debug::channels, STATEMENT) # if defined(Debug) && !defined(ROBOPTIM_CORE_INTERNAL) -# error The application source file (.cc or .cpp) must use '#include "debug.h"' _before_ including the header file that it includes now, that led to this error. +# error The application source file (.cc or .cpp) must use \ + '#include "debug.h"' _before_ including the header file \ + that it includes now, that led to this error. # endif #endif // !ROBOPTIM_CORE_DEBUG_HH diff --git a/include/roboptim/core/derivable-function.hh b/include/roboptim/core/derivable-function.hh index f06b2d9..a5223e3 100644 --- a/include/roboptim/core/derivable-function.hh +++ b/include/roboptim/core/derivable-function.hh @@ -59,8 +59,8 @@ namespace roboptim /// /// If \f$m = 1\f$, then the function id must always be 0 and can be safely /// ignored in the gradient/jacobian computation. - /// The class provides a default value for the function id so that these functions - /// do not have to explicitly set the function id. + /// The class provides a default value for the function id so that + /// these functions do not have to explicitly set the function id. class ROBOPTIM_DLLAPI DerivableFunction : public Function { public: @@ -125,7 +125,8 @@ namespace roboptim /// or after the jacobian computation. /// \param jacobian jacobian will be stored in this argument /// \param argument point at which the jacobian will be computed - void jacobian (jacobian_t& jacobian, const argument_t& argument) const throw () + void jacobian (jacobian_t& jacobian, const argument_t& argument) + const throw () { RoboptimCoreDout (dc::function, "Evaluating jacobian at point: " << argument); diff --git a/include/roboptim/core/finite-difference-gradient.hh b/include/roboptim/core/finite-difference-gradient.hh index f026704..de130b1 100644 --- a/include/roboptim/core/finite-difference-gradient.hh +++ b/include/roboptim/core/finite-difference-gradient.hh @@ -79,7 +79,8 @@ namespace roboptim /// \param o output stream used for display /// \param f function to be displayed /// \return output stream - ROBOPTIM_DLLAPI std::ostream& operator<< (std::ostream& o, const BadGradient& f); + ROBOPTIM_DLLAPI std::ostream& operator<< (std::ostream& o, + const BadGradient& f); /// \brief Contains finite difference gradients policies. /// diff --git a/include/roboptim/core/finite-difference-gradient.hxx b/include/roboptim/core/finite-difference-gradient.hxx index 371c91c..c13b3a3 100644 --- a/include/roboptim/core/finite-difference-gradient.hxx +++ b/include/roboptim/core/finite-difference-gradient.hxx @@ -21,8 +21,8 @@ namespace roboptim { template <typename FdgPolicy> - FiniteDifferenceGradient<FdgPolicy>::FiniteDifferenceGradient (const Function& adaptee, - value_type epsilon) + FiniteDifferenceGradient<FdgPolicy>::FiniteDifferenceGradient + (const Function& adaptee, value_type epsilon) throw () : DerivableFunction (adaptee.inputSize (), adaptee.outputSize ()), FdgPolicy (), @@ -40,9 +40,8 @@ namespace roboptim template <typename FdgPolicy> void - FiniteDifferenceGradient<FdgPolicy>::impl_compute (result_t& result, - const argument_t& argument) - const throw () + FiniteDifferenceGradient<FdgPolicy>::impl_compute + (result_t& result, const argument_t& argument) const throw () { adaptee_ (result, argument); } diff --git a/include/roboptim/core/generic-solver.hh b/include/roboptim/core/generic-solver.hh index 24da9e5..ceabef9 100644 --- a/include/roboptim/core/generic-solver.hh +++ b/include/roboptim/core/generic-solver.hh @@ -144,7 +144,8 @@ namespace roboptim /// \param o output stream used for display /// \param gs solver to be displayed /// \return output stream - ROBOPTIM_DLLAPI std::ostream& operator<< (std::ostream& o, const GenericSolver& gs); + ROBOPTIM_DLLAPI std::ostream& operator<< (std::ostream& o, + const GenericSolver& gs); /// \brief Override operator<< to display ``no solution'' objects. @@ -152,7 +153,8 @@ namespace roboptim /// \param o output stream used for display /// \param ns NoSolution object, ignored /// \return output stream - ROBOPTIM_DLLAPI std::ostream& operator<< (std::ostream& o, const NoSolution& ns); + ROBOPTIM_DLLAPI std::ostream& operator<< (std::ostream& o, + const NoSolution& ns); } // end of namespace roboptim diff --git a/include/roboptim/core/n-times-derivable-function.hh b/include/roboptim/core/n-times-derivable-function.hh index 1db705b..f6e9f1c 100644 --- a/include/roboptim/core/n-times-derivable-function.hh +++ b/include/roboptim/core/n-times-derivable-function.hh @@ -211,8 +211,8 @@ namespace roboptim /// \brief Hessian evaluation. /// - /// Implement the hessian computation, as required by the TwiceDerivableFunction - /// class using the #derivative method. + /// Implement the hessian computation, as required by the + /// TwiceDerivableFunction class using the #derivative method. /// The hessian is computed for a specific sub-function which id is /// passed through the functionId argument. /// \warning Do not call this function directly, call #hessian instead. diff --git a/include/roboptim/core/parametrized-function.hxx b/include/roboptim/core/parametrized-function.hxx index 649be76..3abef86 100644 --- a/include/roboptim/core/parametrized-function.hxx +++ b/include/roboptim/core/parametrized-function.hxx @@ -33,7 +33,8 @@ namespace roboptim template <typename F> typename ParametrizedFunction<F>::result_t - ParametrizedFunction<F>::operator () (const argument_t& argument) const throw () + ParametrizedFunction<F>::operator () (const argument_t& argument) + const throw () { assert (argument.size () == inputSize ()); return impl_compute (argument); diff --git a/include/roboptim/core/problem.hxx b/include/roboptim/core/problem.hxx index 115a9d1..24594d6 100644 --- a/include/roboptim/core/problem.hxx +++ b/include/roboptim/core/problem.hxx @@ -130,7 +130,8 @@ namespace roboptim typename Problem<F, CLIST>::startingPoint_t& Problem<F, CLIST>::startingPoint () throw () { - if (startingPoint_ && startingPoint_->size () != this->function ().inputSize ()) + if (startingPoint_ && startingPoint_->size () + != this->function ().inputSize ()) assert (0 && "Invalid starting point (wrong size)"); return startingPoint_; } @@ -139,7 +140,8 @@ namespace roboptim const typename Problem<F, CLIST>::startingPoint_t& Problem<F, CLIST>::startingPoint () const throw () { - if (startingPoint_ && startingPoint_->size () != this->function ().inputSize ()) + if (startingPoint_ && startingPoint_->size () + != this->function ().inputSize ()) assert (0 && "Invalid starting point (wrong size)"); return startingPoint_; } @@ -285,7 +287,8 @@ namespace roboptim o << iendl << "No starting point."; // Infinity. - o << iendl << "Infinity value (for all functions): " << Function::infinity (); + o << iendl << "Infinity value (for all functions): " + << Function::infinity (); return o << decindent; } diff --git a/include/roboptim/core/solver-error.hh b/include/roboptim/core/solver-error.hh index 45e526c..98f1a34 100644 --- a/include/roboptim/core/solver-error.hh +++ b/include/roboptim/core/solver-error.hh @@ -52,7 +52,8 @@ namespace roboptim /// \param o output stream used for display /// \param e error to be displayed /// \return output stream - ROBOPTIM_DLLAPI std::ostream& operator<< (std::ostream& o, const SolverError& e); + ROBOPTIM_DLLAPI std::ostream& operator<< (std::ostream& o, + const SolverError& e); } // end of namespace roboptim #endif //! ROBOPTIM_CORE_SOLVER_ERROR_HH diff --git a/include/roboptim/core/util.hh b/include/roboptim/core/util.hh index 3c81d05..c33126d 100644 --- a/include/roboptim/core/util.hh +++ b/include/roboptim/core/util.hh @@ -28,11 +28,13 @@ namespace roboptim { /// \internal /// \brief Copy the content of a uBLAS vector into a C array. - ROBOPTIM_DLLAPI void vector_to_array (Function::value_type* dst, const Function::vector_t& src); + ROBOPTIM_DLLAPI void vector_to_array (Function::value_type* dst, + const Function::vector_t& src); /// \internal /// \brief Copy the content of a C array into a uBLAS vector. - ROBOPTIM_DLLAPI void array_to_vector (Function::vector_t& dst, const Function::value_type* src); + ROBOPTIM_DLLAPI void array_to_vector (Function::vector_t& dst, + const Function::value_type* src); /// \internal /// Merge gradients from several functions (each gradient is a line). diff --git a/src/debug.cc b/src/debug.cc index b1ff4a8..bc747cd 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -56,7 +56,8 @@ namespace roboptim Debug(libcw_do.set_ostream (&std::cerr)); # endif //! LIBCWD_THREAD_SAFE - // Write a list of all existing debug channels to the default debug device. + // Write a list of all existing debug channels to the default + // debug device. Debug(list_channels_on (libcw_do)); } @@ -66,19 +67,22 @@ namespace roboptim void init () { // You want this, unless you mix streams output with C output. - // Read http://gcc.gnu.org/onlinedocs/libstdc++/27_io/howto.html#8 for an explanation. - // We can't use it, because other code uses printf to write to the console. + // Read + // http://gcc.gnu.org/onlinedocs/libstdc++/27_io/howto.html#8 + // for an explanation. We can't use it, because other code uses + // printf to write to the console. Debug(set_invisible_on ()); // Cause "memory leaks" ([w]cin, [w]cout and [w]cerr filebuf allocations). std::ios::sync_with_stdio (false); Debug(set_invisible_off ()); - // This will warn you when you are using header files that do not belong to the - // shared libcwd object that you linked with. + // This will warn you when you are using header files that do + // not belong to the shared libcwd object that you linked with. Debug(check_configuration()); # if CWDEBUG_ALLOC - // Remove all current (pre- main) allocations from the Allocated Memory Overview. + // Remove all current (pre- main) allocations from the Allocated + // Memory Overview. libcwd::make_all_allocations_invisible_except (0); # endif diff --git a/src/doc.hh b/src/doc.hh index fe531e5..dac74e5 100644 --- a/src/doc.hh +++ b/src/doc.hh @@ -24,20 +24,22 @@ RobOptim Core defines a C++ common interface to several non linear problem solvers. - The package is composed of a base class called optimization::GenericSolver and - several sub-classes which transform the problem in order to pass it to an - external solver. + The package is composed of a base class called + optimization::GenericSolver and several sub-classes which transform + the problem in order to pass it to an external solver. The interface relies heavily on Boost for: <ul> <li>advanced typing (Boost.Optional and Boost.Variant),</li> <li>matrix manipulation (Boost.uBLAS).</li> - <li>and meta-programming (Boost.StaticAssert, Boost.TypeTraits, Boost.MPL).</li> + <li>and meta-programming + (Boost.StaticAssert, Boost.TypeTraits, Boost.MPL).</li> </ul> - New users might want to check out the idea behind Boost.Optional and Boost.Variant - are these types are present in the public interface. + New users might want to check out the idea behind Boost.Optional + and Boost.Variant are these types are present in the public + interface. Users do not have to know about meta-programming to use this library. @@ -62,7 +64,8 @@ <a href="http://roboptim.sourceforge.net/">web page</a>. To discuss about this package, please use <a - href="https://lists.sourceforge.net/mailman/listinfo/roboptim-user">rob...@li...</a>. + href="https://lists.sourceforge.net/mailman/listinfo/roboptim-user" + >rob...@li...</a>. */ @@ -78,7 +81,8 @@ - Use one of the solvers to solve your problem. - The following example defines a cost function F and two constraints G0 and G1. + The following example defines a cost function F and two constraints + G0 and G1. \section problem Problem definition @@ -379,8 +383,8 @@ int run_test () } \endcode - This is the last piece of code needed to instantiate and resolve an optimization - problem with this package. + This is the last piece of code needed to instantiate and resolve + an optimization problem with this package. To see more usage examples, consider looking at the test directory of the project which contains the project's test suite. @@ -399,7 +403,8 @@ int run_test () Solvers we plan to support in the future: <ul> - <li><a href="http://vxl.sourceforge.net/">Optimization algorithms from VXL/VNL</a></li> + <li><a href="http://vxl.sourceforge.net/" + >Optimization algorithms from VXL/VNL</a></li> </ul> \section boost_optvar What are those Optional and Variant types? @@ -601,7 +606,8 @@ int run_test () <ul> <li><code>No_Solution</code>: represents the fact that solve has never been - called. A user should never retrieve an instance of <code>No_Solution</code>.</li> + called. A user should never retrieve an instance of <code>No_Solution</code>. + </li> <li><code>Result</code>, <code>ResultWithWarnings</code>: represents a <strong>valid</strong> result. If <code>ResultWithWarnings</code> is used, some non-critical problem might have happened and are specified in the object diff --git a/src/finite-difference-gradient.cc b/src/finite-difference-gradient.cc index edc4ce1..26d2ad2 100644 --- a/src/finite-difference-gradient.cc +++ b/src/finite-difference-gradient.cc @@ -179,7 +179,8 @@ namespace roboptim if (round < trunc && (round > 0 && trunc > 0)) { - value_type r_opt = 0., round_opt = 0., trunc_opt = 0., error_opt = 0.; + value_type r_opt = 0., round_opt = 0., trunc_opt = 0., + error_opt = 0.; /* Compute an optimised stepsize to minimize the total error, using the scaling of the truncation error (O(h^2)) and @@ -193,8 +194,9 @@ namespace roboptim argument, idFunction); error_opt = round_opt + trunc_opt; - /* Check that the new error is smaller, and that the new derivative - is consistent with the error bounds of the original estimate. */ + /* Check that the new error is smaller, and that the new + derivative is consistent with the error bounds of the + original estimate. */ if (error_opt < error && std::fabs (r_opt - r_0) < 4. * error) { diff --git a/tests/Makefile.am b/tests/Makefile.am index c8e0762..f85879f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -101,7 +101,8 @@ plugin_LDADD = $(top_builddir)/src/libroboptim-core.la # finite-difference-gradient check_PROGRAMS += finite-difference-gradient -finite_difference_gradient_SOURCES = finite-difference-gradient.cc $(COMMON_SOURCES) +finite_difference_gradient_SOURCES = finite-difference-gradient.cc \ + $(COMMON_SOURCES) finite_difference_gradient_LDADD = $(top_builddir)/src/libroboptim-core.la # identity-function diff --git a/tests/plugin.cc b/tests/plugin.cc index 67f2d7d..12158e9 100644 --- a/tests/plugin.cc +++ b/tests/plugin.cc @@ -35,7 +35,8 @@ struct F : public Function F () : Function (4, 1, "a * d * (a + b + c) + d") {} - void impl_compute (result_t& result, const argument_t& argument) const throw () + void impl_compute (result_t& result, const argument_t& argument) + const throw () { result (0) = argument[0] * argument[3] * (argument[0] + argument[1] + argument[2]) + argument[3]; commit 593c968ef145a470852973c5da00d9b720960ad3 Author: Thomas Moulard <tho...@gm...> Date: Fri Sep 25 17:10:22 2009 +0200 Simplify version updating in autotest.mk. * build-aux: Synchronize. * tests/atlocal.in: Simplify. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 639ab2d..4f92510 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-09-25 Thomas Moulard <tho...@gm...> + Simplify version updating in autotest.mk. + * build-aux: Synchronize. + * tests/atlocal.in: Simplify. + +2009-09-25 Thomas Moulard <tho...@gm...> + Remove obsolete information from README. * README: Here. diff --git a/build-aux b/build-aux index d53fadb..dbc0bfd 160000 --- a/build-aux +++ b/build-aux @@ -1 +1 @@ -Subproject commit d53fadb06fcd07a44a55be9189312edc4ff9eb8a +Subproject commit dbc0bfd14461f788568c9511836996dc4e0663a9 diff --git a/tests/atlocal.in b/tests/atlocal.in index a0869a9..f6c23c7 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -20,6 +20,3 @@ # Add test binaries to PATH. PATH=@abs_builddir@:$PATH - -# Software version. -export VERSION='@VERSION@' commit c2aa127153039eaf893a05ada752b735c7bd3af7 Author: Thomas Moulard <tho...@gm...> Date: Fri Sep 25 17:09:32 2009 +0200 Remove obsolete information from README. * README: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index 5ac9ac2..639ab2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-09-25 Thomas Moulard <tho...@gm...> + Remove obsolete information from README. + * README: Here. + +2009-09-25 Thomas Moulard <tho...@gm...> + Add URL information. * configure.ac: Here. diff --git a/README b/README index f04f6c4..476264e 100644 --- a/README +++ b/README @@ -3,22 +3,6 @@ For general information about the project, please refer to its homepage: http://roboptim.sourceforge.net -* Why configure does not detect CFSQP? - -CFSQP is always distributed as a C header and source file. As a result, you -will have to build yourself a library to use CFSQP with roboptim. - -Copy cfsqp.c qld.c and cfsqpusr.h in a directory and type: -$ g++ cfsqp.c qld.c -shared -fPIC -o libcfsqp.so - -Then, make sure that gcc search for headers/libraries in this directory. For -instance, you can call configure with additional parameters: - -$ cd roboptim-core -$ mkdir _build && cd _build -$ ../configure CPPFLAGS=-I/path/to/cfsqp LDFLAGS=-L/path/to/cfsqp - - * Where is the library documentation? This README only covers configure/building issues, for more information commit 66e13be69793e1753cd128bc268d58563a3dbe4d Author: Thomas Moulard <tho...@gm...> Date: Fri Sep 25 17:09:04 2009 +0200 Add URL information. * configure.ac: Here. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index cd2da18..5ac9ac2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-09-25 Thomas Moulard <tho...@gm...> + Add URL information. + * configure.ac: Here. + +2009-09-25 Thomas Moulard <tho...@gm...> + Fix version files generation. * Makefile.am: Do no generate ``.version'' in a tarball (as user might not have control on source directory, for instance diff --git a/configure.ac b/configure.ac index e21f2f3..cada9db 100644 --- a/configure.ac +++ b/configure.ac @@ -8,7 +8,8 @@ AC_PREREQ([2.59]) AC_INIT([RobOptim core library], m4_esyscmd([build-aux/git-version-gen .tarball-version]), [rob...@li...], - [roboptim-core]) + [roboptim-core], + [http://roboptim.sourceforge.net/]) # Auxiliary files. AC_CONFIG_AUX_DIR([build-aux]) ----------------------------------------------------------------------- Summary of changes: ChangeLog | 35 ++++++++++++++++++++ README | 16 --------- build-aux | 2 +- configure.ac | 3 +- include/roboptim/core/debug.hh | 4 ++- include/roboptim/core/derivable-function.hh | 7 ++-- .../roboptim/core/finite-difference-gradient.hh | 3 +- .../roboptim/core/finite-difference-gradient.hxx | 9 ++--- include/roboptim/core/generic-solver.hh | 6 ++- .../roboptim/core/n-times-derivable-function.hh | 4 +- include/roboptim/core/parametrized-function.hxx | 3 +- include/roboptim/core/problem.hxx | 9 +++-- include/roboptim/core/solver-error.hh | 3 +- include/roboptim/core/util.hh | 6 ++- src/debug.cc | 16 ++++++--- src/doc.hh | 30 ++++++++++------- src/finite-difference-gradient.cc | 8 +++-- tests/Makefile.am | 3 +- tests/atlocal.in | 3 -- tests/plugin.cc | 3 +- 20 files changed, 108 insertions(+), 65 deletions(-) hooks/post-receive -- roboptim-core |