A Decomposition is a partition of a bounded Euclidean space into a fixed number of regions which are denoted by integers. More...
#include <Decomposition.h>
Public Member Functions | |
Decomposition (const int n, const std::size_t dim, const base::RealVectorBounds &b) | |
Constructor. Creates a Decomposition with a given number of regions, a given dimension, and a given set of bounds. | |
virtual int | getNumRegions () const |
Returns the number of regions in this Decomposition. | |
virtual std::size_t | getDimension () const |
Returns the dimension of this Decomposition. | |
virtual const base::RealVectorBounds & | getBounds () const |
Returns the bounds of this Decomposition. | |
virtual double | getRegionVolume (const int rid) const =0 |
Returns the volume of a given region in this Decomposition. | |
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 calling project(). | |
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 void | getNeighbors (const int rid, std::vector< int > &neighbors) const =0 |
Stores a given region's neighbors into a given vector. | |
virtual void | sampleFromRegion (const int rid, const base::StateSamplerPtr &sampler, base::State *s)=0 |
Samples a State from a given region using a given StateSampler. | |
virtual const base::RealVectorBounds & | getRegionBounds (const int rid)=0 |
Returns the bounds of a given region in this Decomposition. |
Protected Attributes | |
const int | numRegions_ |
const std::size_t | dimension_ |
const base::RealVectorBounds | bounds_ |
A Decomposition is a partition of a bounded Euclidean space into a fixed number of regions which are denoted by integers.
Definition at line 61 of file Decomposition.h.