ompl::base::PlannerTerminationCondition Class Reference

Encapsulate a termination condition for a motion planner. Planners will call operator() to decide whether they should terminate before a solution is found or not. operator() will return true if either the implemented condition is met (the call to eval() returns true) or if the user called terminate(true). More...

#include <PlannerTerminationCondition.h>

Inheritance diagram for ompl::base::PlannerTerminationCondition:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual bool eval (void) const
 The implementation of some termination condition. By default, this just calls fn_().
bool operator() (void) const
 Return true if the planner should stop its computation.
 PlannerTerminationCondition (const PlannerTerminationConditionFn &fn=PlannerTerminationConditionFn())
 Construct a termination condition. By default, eval() will call the externally specified function fn to decide whether the planner should terminate. The function fn does not always need to be specified, if a different implementation of eval() is provided by a derived class.
virtual void terminate (bool flag)
 Notify that the condition for termination should become true, regardless of what eval() returns.
virtual ~PlannerTerminationCondition (void)

Protected Attributes

PlannerTerminationConditionFn fn_
 Function pointer to the piece of code that decides whether a termination condition has been met.
bool terminate_
 Flag indicating whether the user has externally requested that the condition for termination should become true.

Detailed Description

Encapsulate a termination condition for a motion planner. Planners will call operator() to decide whether they should terminate before a solution is found or not. operator() will return true if either the implemented condition is met (the call to eval() returns true) or if the user called terminate(true).

Definition at line 64 of file PlannerTerminationCondition.h.


Constructor & Destructor Documentation

ompl::base::PlannerTerminationCondition::PlannerTerminationCondition ( const PlannerTerminationConditionFn fn = PlannerTerminationConditionFn()  )  [inline]

Construct a termination condition. By default, eval() will call the externally specified function fn to decide whether the planner should terminate. The function fn does not always need to be specified, if a different implementation of eval() is provided by a derived class.

Definition at line 71 of file PlannerTerminationCondition.h.

virtual ompl::base::PlannerTerminationCondition::~PlannerTerminationCondition ( void   )  [inline, virtual]

Definition at line 75 of file PlannerTerminationCondition.h.


Member Function Documentation

virtual bool ompl::base::PlannerTerminationCondition::eval ( void   )  const [virtual]

The implementation of some termination condition. By default, this just calls fn_().

Reimplemented in ompl::base::PlannerThreadedTerminationCondition, ompl::base::PlannerOrTerminationCondition, and ompl::base::PlannerAndTerminationCondition.

bool ompl::base::PlannerTerminationCondition::operator() ( void   )  const [inline]

Return true if the planner should stop its computation.

Definition at line 80 of file PlannerTerminationCondition.h.

virtual void ompl::base::PlannerTerminationCondition::terminate ( bool  flag  )  [virtual]

Notify that the condition for termination should become true, regardless of what eval() returns.

Reimplemented in ompl::base::PlannerThreadedTerminationCondition.


Member Data Documentation

Function pointer to the piece of code that decides whether a termination condition has been met.

Definition at line 94 of file PlannerTerminationCondition.h.

Flag indicating whether the user has externally requested that the condition for termination should become true.

Definition at line 97 of file PlannerTerminationCondition.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


ompl
Author(s): Ioan Sucan/isucan@rice.edu, Mark Moll/mmoll@rice.edu, Lydia Kavraki/kavraki@rice.edu
autogenerated on Fri Jan 11 09:34:00 2013