Aikido
|
Generator for drawing samples from a Sampleable. More...
#include <aikido/constraint/Sampleable.hpp>
Public Member Functions | |
virtual | ~SampleGenerator ()=default |
virtual statespace::ConstStateSpacePtr | getStateSpace () const =0 |
Gets the StateSpace that this SampleGenerator samples from. More... | |
virtual bool | sample (statespace::StateSpace::State *_state)=0 |
Returns one sample from this constraint; returns true if succeeded. More... | |
virtual int | getNumSamples () const =0 |
Gets an upper bound on the number of samples remaining or NO_LIMIT. More... | |
virtual bool | canSample () const =0 |
Returns whether getNumSamples() > 0. More... | |
Static Public Attributes | |
static constexpr int | NO_LIMIT = std::numeric_limits<int>::max() |
Value used to represent a potentially infinite number of samples. More... | |
Generator for drawing samples from a Sampleable.
This object may represent both finite and inifinite sets of samples, as indicated by the return value of getNumSamples(). Note that this value provides only an upper bound on the number of samples available: sample() may transiently fail, i.e. return false, at any point before then.
|
virtualdefault |
|
pure virtual |
Returns whether getNumSamples() > 0.
Implemented in aikido::constraint::uniform::RnBoxConstraintSampleGenerator< N >.
|
pure virtual |
Gets an upper bound on the number of samples remaining or NO_LIMIT.
Implemented in aikido::constraint::uniform::RnBoxConstraintSampleGenerator< N >.
|
pure virtual |
Gets the StateSpace that this SampleGenerator samples from.
Implemented in aikido::constraint::uniform::RnBoxConstraintSampleGenerator< N >.
|
pure virtual |
Returns one sample from this constraint; returns true if succeeded.
Implemented in aikido::constraint::uniform::RnBoxConstraintSampleGenerator< N >.
|
staticconstexpr |
Value used to represent a potentially infinite number of samples.