KrisLibrary
1.0.0
|
A grid-based (n-d projected histogram) density estimator. More...
#include <DensityEstimator.h>
Public Member Functions | |
GridDensityEstimator (const std::vector< int > &mappedDims, Math::Real h) | |
GridDensityEstimator (const std::vector< int > &mappedDims, const Math::Vector &h) | |
void | Randomize (int numSourceDims, int numMapped, const Vector &hsource) |
void | Randomize (int numSourceDims, int numMapped, Real h) |
virtual void | Clear () |
virtual void | Add (const Math::Vector &x, void *data) |
virtual void | Remove (const Math::Vector &x, void *data) |
virtual double | Density (const Config &x) |
virtual void * | RandomNear (const Math::Vector &x) |
virtual void * | Random () |
Public Member Functions inherited from DensityEstimatorBase | |
virtual void | Random (Math::Vector &x) |
Public Attributes | |
std::vector< int > | mappedDims |
Math::Vector | h |
Geometry::GridSubdivision | subdiv |
Math::Vector | temp |
std::vector< Geometry::GridSubdivision::ObjectSet * > | flattenedBuckets |
A grid-based (n-d projected histogram) density estimator.
The grid operates on certain dimensions of the configuration. Specifically, it picks mappedDims dimensions at random from the full configuration space, and divides the space in those dimensions into cells of width h.
Due to data fragmentation, the number of mapped dimensions should be relatively small. <= 3 is usually a good choice.
Note: Randomize will destroy the contents of the estimator.