Abstract definition for a class computing projections to Rn. Implicit integer grids are imposed on this projection space by setting cell sizes. Before use, the user must supply cell sizes for the integer grid (setCellSizes()). The implementation of this class is thread safe. More...
#include <ProjectionEvaluator.h>
Public Member Functions | |
void | checkCellSizes (void) const |
Check if cell dimensions match projection dimension. | |
void | computeCellSizes (const std::vector< const State * > &states) |
Given a set of samples, usually from the exploration data structure of an algorithm, compute the set of cells sizes that best fits this data structure. | |
void | computeCoordinates (const State *state, ProjectionCoordinates &coord) const |
Compute integer coordinates for a state. | |
void | computeCoordinates (const EuclideanProjection &projection, ProjectionCoordinates &coord) const |
Compute integer coordinates for a projection. | |
virtual void | defaultCellSizes (void) |
Set the default cell dimensions for this projection. The default implementation of this function is empty. setup() calls this function if no cell dimensions have been previously set. | |
const std::vector< double > & | getCellSizes (void) const |
Get the size (each dimension) of a grid cell. | |
virtual unsigned int | getDimension (void) const =0 |
Return the dimension of the projection defined by this evaluator. | |
void | inferCellSizes (void) |
Sample the state space and decide on default cell sizes. This function is called by setup() if no cell dsizes have been set and defaultCellSizes() does not fill the cell sizes either. | |
virtual void | printProjection (const EuclideanProjection &projection, std::ostream &out=std::cout) const |
Print a euclidean projection. | |
virtual void | printSettings (std::ostream &out=std::cout) const |
Print settings about this projection. | |
virtual void | project (const State *state, EuclideanProjection &projection) const =0 |
Compute the projection as an array of double values. | |
ProjectionEvaluator (const StateSpacePtr &space) | |
Construct a projection evaluator for a specific state space. | |
ProjectionEvaluator (const StateSpace *space) | |
Construct a projection evaluator for a specific state space. | |
void | setCellSizes (const std::vector< double > &cellSizes) |
Define the size (in each dimension) of a grid cell. The number of sizes set here must be the same as the dimension of the projection computed by the projection evaluator. After a call to this function, setup() will not call defaultCellSizes() or inferCellSizes() any more. | |
virtual void | setup (void) |
Perform configuration steps, if needed. | |
bool | userConfigured (void) const |
Return true if any user configuration has been done to this projection evaluator (setCellSizes() was called). | |
virtual | ~ProjectionEvaluator (void) |
Protected Attributes | |
std::vector< double > | cellSizes_ |
The size of a cell, in every dimension of the projected space, in the implicitly defined integer grid. | |
bool | cellSizesWereInferred_ |
Flag indicating whether projection cell sizes were automatically inferred. | |
bool | defaultCellSizes_ |
Flag indicating whether cell sizes have been set by the user, or whether they were inferred automatically. This flag becomes false if setCellSizes() is called. | |
msg::Interface | msg_ |
The console interface. | |
const StateSpace * | space_ |
The state space this projection operates on. |
Abstract definition for a class computing projections to Rn. Implicit integer grids are imposed on this projection space by setting cell sizes. Before use, the user must supply cell sizes for the integer grid (setCellSizes()). The implementation of this class is thread safe.
Definition at line 155 of file ProjectionEvaluator.h.
ompl::base::ProjectionEvaluator::ProjectionEvaluator | ( | const StateSpace * | space | ) | [inline] |
Construct a projection evaluator for a specific state space.
Definition at line 160 of file ProjectionEvaluator.h.
ompl::base::ProjectionEvaluator::ProjectionEvaluator | ( | const StateSpacePtr & | space | ) | [inline] |
Construct a projection evaluator for a specific state space.
Definition at line 165 of file ProjectionEvaluator.h.
virtual ompl::base::ProjectionEvaluator::~ProjectionEvaluator | ( | void | ) | [inline, virtual] |
Definition at line 169 of file ProjectionEvaluator.h.
void ompl::base::ProjectionEvaluator::checkCellSizes | ( | void | ) | const |
Check if cell dimensions match projection dimension.
void ompl::base::ProjectionEvaluator::computeCellSizes | ( | const std::vector< const State * > & | states | ) |
Given a set of samples, usually from the exploration data structure of an algorithm, compute the set of cells sizes that best fits this data structure.
void ompl::base::ProjectionEvaluator::computeCoordinates | ( | const State * | state, | |
ProjectionCoordinates & | coord | |||
) | const [inline] |
Compute integer coordinates for a state.
Definition at line 226 of file ProjectionEvaluator.h.
void ompl::base::ProjectionEvaluator::computeCoordinates | ( | const EuclideanProjection & | projection, | |
ProjectionCoordinates & | coord | |||
) | const |
Compute integer coordinates for a projection.
virtual void ompl::base::ProjectionEvaluator::defaultCellSizes | ( | void | ) | [virtual] |
Set the default cell dimensions for this projection. The default implementation of this function is empty. setup() calls this function if no cell dimensions have been previously set.
Reimplemented in ompl::base::RealVectorOrthogonalProjectionEvaluator, and ompl::base::RealVectorIdentityProjectionEvaluator.
const std::vector<double>& ompl::base::ProjectionEvaluator::getCellSizes | ( | void | ) | const [inline] |
Get the size (each dimension) of a grid cell.
Definition at line 192 of file ProjectionEvaluator.h.
virtual unsigned int ompl::base::ProjectionEvaluator::getDimension | ( | void | ) | const [pure virtual] |
Return the dimension of the projection defined by this evaluator.
Implemented in ompl::base::RealVectorLinearProjectionEvaluator, ompl::base::RealVectorOrthogonalProjectionEvaluator, and ompl::base::RealVectorIdentityProjectionEvaluator.
void ompl::base::ProjectionEvaluator::inferCellSizes | ( | void | ) |
Sample the state space and decide on default cell sizes. This function is called by setup() if no cell dsizes have been set and defaultCellSizes() does not fill the cell sizes either.
virtual void ompl::base::ProjectionEvaluator::printProjection | ( | const EuclideanProjection & | projection, | |
std::ostream & | out = std::cout | |||
) | const [virtual] |
Print a euclidean projection.
virtual void ompl::base::ProjectionEvaluator::printSettings | ( | std::ostream & | out = std::cout |
) | const [virtual] |
Print settings about this projection.
virtual void ompl::base::ProjectionEvaluator::project | ( | const State * | state, | |
EuclideanProjection & | projection | |||
) | const [pure virtual] |
Compute the projection as an array of double values.
Implemented in ompl::base::RealVectorLinearProjectionEvaluator, ompl::base::RealVectorOrthogonalProjectionEvaluator, and ompl::base::RealVectorIdentityProjectionEvaluator.
void ompl::base::ProjectionEvaluator::setCellSizes | ( | const std::vector< double > & | cellSizes | ) |
Define the size (in each dimension) of a grid cell. The number of sizes set here must be the same as the dimension of the projection computed by the projection evaluator. After a call to this function, setup() will not call defaultCellSizes() or inferCellSizes() any more.
virtual void ompl::base::ProjectionEvaluator::setup | ( | void | ) | [virtual] |
Perform configuration steps, if needed.
Reimplemented in ompl::base::RealVectorIdentityProjectionEvaluator.
bool ompl::base::ProjectionEvaluator::userConfigured | ( | void | ) | const |
Return true if any user configuration has been done to this projection evaluator (setCellSizes() was called).
std::vector<double> ompl::base::ProjectionEvaluator::cellSizes_ [protected] |
The size of a cell, in every dimension of the projected space, in the implicitly defined integer grid.
Definition at line 247 of file ProjectionEvaluator.h.
bool ompl::base::ProjectionEvaluator::cellSizesWereInferred_ [protected] |
Flag indicating whether projection cell sizes were automatically inferred.
Definition at line 257 of file ProjectionEvaluator.h.
bool ompl::base::ProjectionEvaluator::defaultCellSizes_ [protected] |
Flag indicating whether cell sizes have been set by the user, or whether they were inferred automatically. This flag becomes false if setCellSizes() is called.
Definition at line 253 of file ProjectionEvaluator.h.
msg::Interface ompl::base::ProjectionEvaluator::msg_ [protected] |
The console interface.
Definition at line 260 of file ProjectionEvaluator.h.
const StateSpace* ompl::base::ProjectionEvaluator::space_ [protected] |
The state space this projection operates on.
Definition at line 242 of file ProjectionEvaluator.h.