Struct KPIECE1::CloseSamples
Defined in File KPIECE1.h
Nested Relationships
This struct is a nested type of Class KPIECE1.
Struct Documentation
-
struct CloseSamples
Bounded set of good samples.
Public Functions
-
inline CloseSamples(unsigned int size)
Construct an object to maintain a set of at most size samples.
-
bool consider(Grid::Cell *cell, Motion *motion, double distance)
Evaluate whether motion motion, part of cell cell is good enough to be part of the set of samples closest to the goal, given its distance to the goal is distance. If so, add it to the set and return true. Otherwise, return false.
-
bool selectMotion(Motion *&smotion, Grid::Cell *&scell)
Select the top sample (closest to the goal) and update its position in the set subsequently (pretend the distance to the goal is larger). Returns true if the sample selection is successful.
-
inline bool canSample() const
Return true if samples can be selected from this set.
Public Members
-
unsigned int maxSize
Maximum number of samples to maintain.
-
std::set<CloseSample> samples
The maintained samples.
-
inline CloseSamples(unsigned int size)