37 #ifndef OMPL_CONTROL_PLANNERS_SYCLOP_DECOMPOSITION_
38 #define OMPL_CONTROL_PLANNERS_SYCLOP_DECOMPOSITION_
40 #include "ompl/base/spaces/RealVectorBounds.h"
41 #include "ompl/base/StateSampler.h"
42 #include "ompl/base/State.h"
44 #include "ompl/util/Exception.h"
45 #include "ompl/util/ClassForward.h"
46 #include "ompl/util/RandomNumbers.h"
55 OMPL_CLASS_FORWARD(Decomposition);
71 if (dim > b.
low.size())
72 throw Exception(
"Decomposition",
"argument 'dim' exceeds dimension of given bounds");
73 else if (dim < b.
low.size())
74 OMPL_WARN(
"Decomposition: dimension of given bounds exceeds argument 'dim'. Using the first 'dim' values of bounds");
111 virtual void getNeighbors(
unsigned int rid, std::vector<unsigned int>& neighbors)
const = 0;
114 virtual void sampleFromRegion(
unsigned int rid,
RNG& rng, std::vector<double>& coord)
const = 0;
120 virtual void setNumRegions(
unsigned int n)
125 unsigned int numRegions_;
126 unsigned int dimension_;
virtual void getNeighbors(unsigned int rid, std::vector< unsigned int > &neighbors) const =0
Stores a given region's neighbors into a given vector.
std::vector< double > low
Lower bound.
A boost shared pointer wrapper for ompl::base::StateSampler.
A Decomposition is a partition of a bounded Euclidean space into a fixed number of regions which are ...
virtual void sampleFullState(const base::StateSamplerPtr &sampler, const std::vector< double > &coord, base::State *s) const =0
Samples a State using a projected coordinate and a StateSampler.
Random number generation. An instance of this class cannot be used by multiple threads at once (membe...
Definition of an abstract state.
virtual int locateRegion(const base::State *s) const =0
Returns the index of the region containing a given State. Most often, this is obtained by first calli...
#define OMPL_WARN(fmt,...)
Log a formatted warning string.
virtual void project(const base::State *s, std::vector< double > &coord) const =0
Project a given State to a set of coordinates in R^k, where k is the dimension of this Decomposition...
virtual unsigned int getDimension() const
Returns the dimension of this Decomposition.
The exception type for ompl.
Decomposition(unsigned int dim, const base::RealVectorBounds &b, unsigned int nreg=0)
Constructor. Creates a Decomposition with a given dimension and a given set of bounds. Accepts as an optional argument a given number of regions.
The lower and upper bounds for an Rn space.
virtual double getRegionVolume(unsigned int rid)=0
Returns the volume of a given region in this Decomposition.
virtual void sampleFromRegion(unsigned int rid, RNG &rng, std::vector< double > &coord) const =0
Samples a projected coordinate from a given region.
virtual unsigned int getNumRegions() const
Returns the number of regions in this Decomposition.
virtual const base::RealVectorBounds & getBounds() const
Returns the bounds of this Decomposition.