Doxygen
1.9.1
|
Interface for the likelihood classes. More...
#include <tsgDreamLikelihoodCore.hpp>
Public Member Functions | |
TasmanianLikelihood () | |
Empty default constructor. | |
virtual | ~TasmanianLikelihood () |
Empty virtual destructor. | |
virtual void | getLikelihood (TypeSamplingForm form, const std::vector< double > &model, std::vector< double > &likely) const =0 |
Purely virtual method used by SampleDREAMPosterior(), computes the likelihood of multiple model values. More... | |
virtual void | getLikelihood (TypeSamplingForm form, double const model[], int num_samples, double likely[]) const =0 |
Overload for raw-arrays, for interface purposes mostly, never called from C++ directly. | |
virtual int | getNumOutputs () const =0 |
Return the number of expected model outputs. | |
virtual | operator std::function< void (TypeSamplingForm, const std::vector< double > &, std::vector< double > &)>() const |
Automatically convert the likelihood into input for TasDREAM::posterior(). | |
Interface for the likelihood classes.
|
pure virtual |
Purely virtual method used by SampleDREAMPosterior(), computes the likelihood of multiple model values.
The model vector is the same as the output of the model lambda in SampleDREAMPosterior() or the TasGrid::TasmanianSparseGrid::evaluateBatch(), the model realizations are stored contiguously in strides of length equal to the number of model outputs. The likely vector is pre-allocated with size matching the number of model realizations under considerations (no resize is needed), this function must populate the likely entries with the corresponding values of the likelihood. Note that model.size() / likely.size() will divide evenly and will equal the number of model realizations.
Implemented in TasDREAM::LikelihoodGaussAnisotropic, and TasDREAM::LikelihoodGaussIsotropic.