Simox  2.3.49
Saba::Sampler Class Referenceabstract

An interface class for custom sample algorithms. More...

Public Member Functions

 Sampler (unsigned int dimension)
 
virtual ~Sampler ()
 
virtual void sample (Eigen::VectorXf &stroreConfig, CSpacePtr space)=0
 
virtual void enableMetricWeights (const Eigen::VectorXf &weights)
 
virtual void disableMetricWeights ()
 

Protected Member Functions

void getUniformlyRandomConfig (Eigen::VectorXf &stroreConfig, CSpacePtr space)
 Returns a uniformly generated random configuration with nDimension components. More...
 
void getNormalRandomConfig (Eigen::VectorXf &stroreConfig, const Eigen::VectorXf &mean, const Eigen::MatrixXf &variance)
 
void getNormalRandomConfig (Eigen::VectorXf &stroreConfig, const Eigen::VectorXf &mean, float variance)
 

Protected Attributes

unsigned int dimension
 
Eigen::VectorXf metricWeights
 

Detailed Description

An interface class for custom sample algorithms.

Constructor & Destructor Documentation

Saba::Sampler::Sampler ( unsigned int  dimension)
Saba::Sampler::~Sampler ( )
virtual

Member Function Documentation

void Saba::Sampler::disableMetricWeights ( )
virtual
void Saba::Sampler::enableMetricWeights ( const Eigen::VectorXf &  weights)
virtual

Enable metric weighting. This can be useful for different variance in each dimension. Standard: disabled

void Saba::Sampler::getNormalRandomConfig ( Eigen::VectorXf &  stroreConfig,
const Eigen::VectorXf &  mean,
const Eigen::MatrixXf &  variance 
)
protected

Returns a normal distributed random configuration with nDimension components. Note that we assume the covariance-matrix to be a diagonal matrix. This means, that the components of the configuration are uncorrelated. The result value is not checked against any boundaries of the configuration space.

void Saba::Sampler::getNormalRandomConfig ( Eigen::VectorXf &  stroreConfig,
const Eigen::VectorXf &  mean,
float  variance 
)
protected

Returns a normal distributed random configuration with nDimension components. This is a convenience function in case you want to apply the same variance in every dimension.

void Saba::Sampler::getUniformlyRandomConfig ( Eigen::VectorXf &  stroreConfig,
CSpacePtr  space 
)
protected

Returns a uniformly generated random configuration with nDimension components.

virtual void Saba::Sampler::sample ( Eigen::VectorXf &  stroreConfig,
CSpacePtr  space 
)
pure virtual

Field Documentation

unsigned int Saba::Sampler::dimension
protected
Eigen::VectorXf Saba::Sampler::metricWeights
protected