OKVIS ROS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
okvis::ceres::CeresIterationCallback Class Reference

The CeresIterationCallback class tries to enforce a time limit on the optimization. It does not guarantee to stay within the time budget as it assumes the next iteration takes as long as the previous iteration. More...

#include <CeresIterationCallback.hpp>

Inheritance diagram for okvis::ceres::CeresIterationCallback:

Public Member Functions

 CeresIterationCallback (double timeLimit, int iterationMinimum)
 The constructor. More...
 
 ~CeresIterationCallback ()
 Trivial Destructor. More...
 
::ceres::CallbackReturnType operator() (const ::ceres::IterationSummary &summary)
 This method is called after every iteration in ceres. More...
 
void setTimeLimit (double timeLimit)
 setTimeLimit changes time limit of optimization. If you want to disable the time limit, either set it to a large value, delete the callback in the ceres options or set the minimum iterations to the maximum iteration. More...
 
void setMinimumIterations (int iterationMinimum)
 setMinimumIterations changes the minimum iterations the optimization goes through disregarding the time limit More...
 

Private Attributes

double timeLimit_
 The set time limit. More...
 
int iterationMinimum_
 The set maximum no. iterations. More...
 

Detailed Description

The CeresIterationCallback class tries to enforce a time limit on the optimization. It does not guarantee to stay within the time budget as it assumes the next iteration takes as long as the previous iteration.

Constructor & Destructor Documentation

okvis::ceres::CeresIterationCallback::CeresIterationCallback ( double  timeLimit,
int  iterationMinimum 
)
inline

The constructor.

Parameters
[in]timeLimitTime budget for the optimization.
[in]iterationMinimumMinimum iterations the optimization should perform disregarding the time.
okvis::ceres::CeresIterationCallback::~CeresIterationCallback ( )
inline

Trivial Destructor.

Member Function Documentation

::ceres::CallbackReturnType okvis::ceres::CeresIterationCallback::operator() ( const ::ceres::IterationSummary &  summary)
inline

This method is called after every iteration in ceres.

Parameters
[in]summaryThe iteration summary.
void okvis::ceres::CeresIterationCallback::setMinimumIterations ( int  iterationMinimum)
inline

setMinimumIterations changes the minimum iterations the optimization goes through disregarding the time limit

Parameters
iterationMinimum
void okvis::ceres::CeresIterationCallback::setTimeLimit ( double  timeLimit)
inline

setTimeLimit changes time limit of optimization. If you want to disable the time limit, either set it to a large value, delete the callback in the ceres options or set the minimum iterations to the maximum iteration.

Parameters
[in]timeLimitdesired time limit in seconds

Member Data Documentation

int okvis::ceres::CeresIterationCallback::iterationMinimum_
private

The set maximum no. iterations.

double okvis::ceres::CeresIterationCallback::timeLimit_
private

The set time limit.


The documentation for this class was generated from the following file: