Class RejectionInfSampler
Defined in File RejectionInfSampler.h
Inheritance Relationships
Base Type
public ompl::base::InformedSampler
(Class InformedSampler)
Class Documentation
-
class RejectionInfSampler : public ompl::base::InformedSampler
A default rejection sampling scheme that samples uniformly from the entire planning domain. Samples are rejected until one is found that has a heuristic solution estimate that is less than the current solution. In general, direct sampling of the informed subset is much better, but this is a general default.
Public Functions
-
RejectionInfSampler(const ProblemDefinitionPtr &probDefn, unsigned int maxNumberCalls)
Construct a rejection sampler that only generates states with a heuristic solution estimate that is less than the cost of the current solution.
-
~RejectionInfSampler() override = default
-
virtual bool sampleUniform(State *statePtr, const Cost &maxCost) override
Sample uniformly in the subset of the state space whose heuristic solution estimates are less than the provided cost, i.e. in the interval [0, maxCost). Returns false if such a state was not found in the specified number of iterations.
-
virtual bool sampleUniform(State *statePtr, const Cost &minCost, const Cost &maxCost) override
Sample uniformly in the subset of the state space whose heuristic solution estimates are between the provided costs, [minCost, maxCost). Returns false if such a state was not found in the specified number of iterations.
-
virtual bool hasInformedMeasure() const override
Whether the sampler can provide a measure of the informed subset.
-
virtual double getInformedMeasure(const Cost&) const override
The measure of the subset of the state space defined by the current solution cost that is being searched. As rejection sampling has no closed-form knowledge of the informed subset, the measure of the informed space is always the measure of the entire space.
-
virtual double getInformedMeasure(const Cost&, const Cost&) const override
The measure of the subset of the state space defined by the current solution cost that is being searched. As rejection sampling has no closed-form knowledge of the informed subset, the measure of the informed space is always the measure of the entire space.
-
RejectionInfSampler(const ProblemDefinitionPtr &probDefn, unsigned int maxNumberCalls)