All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
ompl::PDF< _T > Class Template Reference

A container that supports probabilistic sampling over weighted data. More...

#include <PDF.h>

List of all members.

Classes

class  Element
 A class that will hold data contained in the PDF. More...

Public Member Functions

 PDF (void)
 Constructs an empty PDF.
 PDF (const std::vector< _T > &d, const std::vector< double > &weights)
 Constructs a PDF containing a given vector of data with given weights.
 ~PDF (void)
 Destructor. Clears allocated memory.
Elementadd (const _T &d, const double w)
 Adds a piece of data with a given weight to the PDF. Returns a corresponding Element, which can be used to subsequently update or remove the data from the PDF.
const _T & sample (double r) const
 Returns a piece of data from the PDF according to the input sampling value, which must be between 0 and 1.
void update (Element &elem, const double w)
 Updates the data in the given Element with a new weight value.
void remove (Element &elem)
 Removes the data in the given Element from the PDF. After calling this function, the Element object should no longer be used.
void clear (void)
 Clears the PDF.
std::size_t size (void) const
 Returns the number of elements in the PDF.
bool empty (void) const
 Returns whether the PDF contains no data.
void printTree (std::ostream &out=std::cout) const
 Prints the PDF tree to a given output stream. Used for debugging purposes.

Detailed Description

template<typename _T>
class ompl::PDF< _T >

A container that supports probabilistic sampling over weighted data.

Definition at line 48 of file PDF.h.


The documentation for this class was generated from the following file:
  • src/ompl/datastructures/PDF.h