versatile-mcmc  0.1.7
Public Types | Public Member Functions | List of all members
vmcmc::ParameterConfig Class Reference

A list of parameters, describing the parameter space of the target function to be evaluated. More...

#include <parameter.hpp>

Public Types

using const_iterator = std::vector< Parameter >::const_iterator
 

Public Member Functions

 ParameterConfig (size_t nInitParams=0)
 
void SetParameter (size_t pIndex, const Parameter &param)
 
void SetParameter (size_t pIndex, const std::string &name, double startValue, double absoluteError, boost::optional< double > lowerLimit=boost::none, boost::optional< double > upperLimit=boost::none, bool fixed=false)
 
ParameterGetParameter (size_t pIndex)
 
const ParameterGetParameter (size_t pIndex) const
 
size_t size () const
 
Parameteroperator[] (size_t pIndex)
 
const Parameteroperator[] (size_t pIndex) const
 
const_iterator begin () const
 
const_iterator end () const
 
void SetErrorScaling (double scaling)
 Set an error scaling factor, which is applied to all parameter errors uniformly. More...
 
double GetErrorScaling () const
 
Vector GetStartValues (bool randomized=false) const
 
Vector GetErrors () const
 
template<typename MatrixT >
void SetCorrelationMatrix (const MatrixT &matrix)
 Set a correlation matrix. More...
 
const MatrixUnitLower & GetCorrelationMatrix () const
 
void SetCorrelation (size_t p1, size_t p2, double correlation)
 
double GetCorrelation (size_t p1, size_t p2) const
 
MatrixLower GetCovarianceMatrix () const
 
MatrixLower GetCholeskyDecomp () const
 
bool IsInsideLimits (const Vector &somePoint) const
 Checks if some vector is inside the configured parameter limits. More...
 
void ConstrainToLimits (Vector &somePoint) const
 If a vector lies outside the parameter limits, constrain it accordingly. More...
 
bool ReflectFromLimits (Vector &somePoint) const
 If a vector lies outside the parameter limits, attempt a reflection from the closest limit in the affected dimension. More...
 

Detailed Description

A list of parameters, describing the parameter space of the target function to be evaluated.

In addition to listing the individual parameter properties, a correlation matrix can be specified.

Member Function Documentation

void vmcmc::ParameterConfig::ConstrainToLimits ( Vector &  somePoint) const

If a vector lies outside the parameter limits, constrain it accordingly.

Parameters
somePointA reference to the vector to be constrained.
bool vmcmc::ParameterConfig::IsInsideLimits ( const Vector &  somePoint) const

Checks if some vector is inside the configured parameter limits.

Parameters
somePoint
Returns
False, if for some parameter index i, somePoint[i] < fParameter[i].fLowerLimit || somePoint[i] > fParameter[i].fUpperLimit.
bool vmcmc::ParameterConfig::ReflectFromLimits ( Vector &  somePoint) const

If a vector lies outside the parameter limits, attempt a reflection from the closest limit in the affected dimension.

Parameters
somePointA reference to the vector to be reflected.
Returns
True, if somePoint did not have to be modified or was reflected successfully (without exceeding any opposite limit).
template<typename MatrixT >
void vmcmc::ParameterConfig::SetCorrelationMatrix ( const MatrixT &  matrix)
inline

Set a correlation matrix.

This should be a lower unit triangular matrix with size corresponding to the number of parameters.

Parameters
matrix
void vmcmc::ParameterConfig::SetErrorScaling ( double  scaling)
inline

Set an error scaling factor, which is applied to all parameter errors uniformly.

Parameters
scaling

The documentation for this class was generated from the following files: