Log the optimization process (values, Jacobians, time taken etc.). More...
#include <roboptim/core/optimization-logger.hh>
Public Types | |
| typedef T | solver_t |
| typedef solver_t::problem_t | problem_t |
| typedef solver_t::problem_t::value_type | value_type |
| typedef solver_t::problem_t::size_type | size_type |
| typedef solver_t::problem_t::vector_t | vector_t |
| typedef solver_t::solverState_t | solverState_t |
| typedef solver_t::callback_t | callback_t |
| typedef solver_t::problem_t::function_t::traits_t | traits_t |
| typedef solver_t::problem_t::function_t | function_t |
| typedef function_t::matrix_t | jacobian_t |
| typedef function_t::const_argument_ref | const_argument_ref |
| typedef GenericDifferentiableFunction< traits_t > | differentiableFunction_t |
Public Member Functions | |
| OptimizationLogger (solver_t &solver, const boost::filesystem::path &path, bool selfRegister=true) | |
| Constructor. | |
| virtual | ~OptimizationLogger () |
| Destructor. | |
| void | append (const std::string &text) |
| Append extra information to the log file. | |
| callback_t | callback () |
| Return the callback function. | |
| const boost::filesystem::path & | logPath () const |
| Return the path of the log directory. | |
Protected Member Functions | |
| void | perIterationCallback (const problem_t &pb, const solverState_t &state) |
| virtual void | perIterationCallbackUnsafe (const typename solver_t::problem_t &pb, const typename solver_t::solverState_t &state) |
| const boost::filesystem::path & | path () const |
| Return the path of the log directory. | |
| boost::filesystem::path & | path () |
| Return the path of the log directory. | |
| const solver_t & | solver () const |
| Return the solver associated with the logger. | |
| solver_t & | solver () |
| Return the solver associated with the logger. | |
| unsigned | callbackCallId () const |
| Return the callback iteration index. | |
Log the optimization process (values, Jacobians, time taken etc.).
| T | solver type. |
| typedef solver_t::callback_t roboptim::OptimizationLogger< T >::callback_t |
| typedef function_t::const_argument_ref roboptim::OptimizationLogger< T >::const_argument_ref |
| typedef GenericDifferentiableFunction<traits_t> roboptim::OptimizationLogger< T >::differentiableFunction_t |
| typedef solver_t::problem_t::function_t roboptim::OptimizationLogger< T >::function_t |
| typedef function_t::matrix_t roboptim::OptimizationLogger< T >::jacobian_t |
| typedef solver_t::problem_t roboptim::OptimizationLogger< T >::problem_t |
| typedef solver_t::problem_t::size_type roboptim::OptimizationLogger< T >::size_type |
| typedef T roboptim::OptimizationLogger< T >::solver_t |
| typedef solver_t::solverState_t roboptim::OptimizationLogger< T >::solverState_t |
| typedef solver_t::problem_t::function_t::traits_t roboptim::OptimizationLogger< T >::traits_t |
| typedef solver_t::problem_t::value_type roboptim::OptimizationLogger< T >::value_type |
| typedef solver_t::problem_t::vector_t roboptim::OptimizationLogger< T >::vector_t |
|
explicit |
Constructor.
| solver | solver that will be logged. |
| path | path to the log directory. |
| selfRegister | whether the logger will register itself as a callback with the solver. Set this to false if you use it with a multiplexer. |
References roboptim::iendl(), path(), ROBOPTIM_CORE_VERSION, and solver().
|
virtual |
| void roboptim::OptimizationLogger< T >::append | ( | const std::string & | text | ) |
Append extra information to the log file.
| text | text to append. |
References roboptim::iendl().
| OptimizationLogger< T >::callback_t roboptim::OptimizationLogger< T >::callback | ( | ) |
Return the callback function.
This can be used with a callback multiplexer.
References perIterationCallback().
|
protected |
Return the callback iteration index.
| const boost::filesystem::path & roboptim::OptimizationLogger< T >::logPath | ( | ) | const |
Return the path of the log directory.
|
protected |
Return the path of the log directory.
This method is protected since streams would need to be updated, and files that were already written moved to the new location.
|
protected |
Return the path of the log directory.
Referenced by OptimizationLogger().
|
protected |
References perIterationCallbackUnsafe().
Referenced by callback().
|
protectedvirtual |
References roboptim::decindent(), roboptim::iendl(), and roboptim::incindent().
Referenced by perIterationCallback().
|
protected |
Return the solver associated with the logger.
|
protected |
Return the solver associated with the logger.
Referenced by OptimizationLogger().