gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
Gambit::Priors::BasePrior Class Referenceabstract

Abstract base class for priors. More...

#include <base_prior.hpp>

Inheritance diagram for Gambit::Priors::BasePrior:
Collaboration diagram for Gambit::Priors::BasePrior:

Public Member Functions

virtual ~BasePrior ()=default
 
 BasePrior ()
 
 BasePrior (const int param_size)
 
 BasePrior (const std::vector< std::string > &param_names, const int param_size=0)
 
 BasePrior (const std::string &param_name, const int param_size=0)
 
virtual void transform (const std::vector< double > &, std::unordered_map< std::string, double > &) const =0
 Transform from unit hypercube to parameter. More...
 
virtual std::vector< doubleinverse_transform (const std::unordered_map< std::string, double > &) const =0
 Transform from parameter back to unit hypercube. More...
 
virtual double operator() (const std::vector< double > &) const
 Log of PDF density. More...
 
virtual std::vector< std::string > getShownParameters () const
 
unsigned int size () const
 
void setSize (const unsigned int size)
 
unsigned intsizeRef ()
 
std::vector< std::string > getParameters () const
 

Protected Attributes

std::vector< std::string > param_names
 

Private Attributes

unsigned int param_size
 

Detailed Description

Abstract base class for priors.

Definition at line 40 of file base_prior.hpp.

Constructor & Destructor Documentation

◆ ~BasePrior()

virtual Gambit::Priors::BasePrior::~BasePrior ( )
virtualdefault

◆ BasePrior() [1/4]

Gambit::Priors::BasePrior::BasePrior ( )
inline

Definition at line 51 of file base_prior.hpp.

51 : param_size(0), param_names(0) {}
std::vector< std::string > param_names
Definition: base_prior.hpp:46

◆ BasePrior() [2/4]

Gambit::Priors::BasePrior::BasePrior ( const int  param_size)
inlineexplicit

Definition at line 53 of file base_prior.hpp.

53  :
std::vector< std::string > param_names
Definition: base_prior.hpp:46

◆ BasePrior() [3/4]

Gambit::Priors::BasePrior::BasePrior ( const std::vector< std::string > &  param_names,
const int  param_size = 0 
)
inlineexplicit

Definition at line 56 of file base_prior.hpp.

56  :
57  param_size(param_size), param_names(param_names) {}
std::vector< std::string > param_names
Definition: base_prior.hpp:46

◆ BasePrior() [4/4]

Gambit::Priors::BasePrior::BasePrior ( const std::string &  param_name,
const int  param_size = 0 
)
inlineexplicit

Definition at line 59 of file base_prior.hpp.

References inverse_transform(), and transform().

59  :
60  param_size(param_size), param_names(1, param_name) {}
std::vector< std::string > param_names
Definition: base_prior.hpp:46
Here is the call graph for this function:

Member Function Documentation

◆ getParameters()

std::vector<std::string> Gambit::Priors::BasePrior::getParameters ( ) const
inline

Definition at line 83 of file base_prior.hpp.

References param_names.

Referenced by Gambit::Scanner::Function_Base< ret(args...)>::getParameters(), and Gambit::Scanner::Scan_Manager::Scan_Manager().

83 { return param_names; }
std::vector< std::string > param_names
Definition: base_prior.hpp:46
Here is the caller graph for this function:

◆ getShownParameters()

virtual std::vector<std::string> Gambit::Priors::BasePrior::getShownParameters ( ) const
inlinevirtual

Reimplemented in Gambit::Priors::MultiPriors, Gambit::Priors::FixedPrior, and Gambit::Priors::CompositePrior.

Definition at line 75 of file base_prior.hpp.

References param_names.

Referenced by Gambit::Priors::CompositePrior::CompositePrior(), and Gambit::Scanner::Function_Base< ret(args...)>::getShownParameters().

75 { return param_names; }
std::vector< std::string > param_names
Definition: base_prior.hpp:46
Here is the caller graph for this function:

◆ inverse_transform()

virtual std::vector<double> Gambit::Priors::BasePrior::inverse_transform ( const std::unordered_map< std::string, double > &  ) const
pure virtual

◆ operator()()

virtual double Gambit::Priors::BasePrior::operator() ( const std::vector< double > &  ) const
inlinevirtual

Log of PDF density.

Reimplemented in Gambit::Priors::RangePrior1D< T >, Gambit::Priors::LogNormal, Gambit::Priors::Gaussian, Gambit::Priors::Cauchy, Gambit::Priors::DoubleLogFlatJoin, and Gambit::Priors::Plugin.

Definition at line 69 of file base_prior.hpp.

References LOCAL_INFO, and Gambit::Scanner::scan_error().

70  {
71  Scanner::scan_error().raise(LOCAL_INFO, "operator() not implemented");
72  return 0.;
73  }
#define LOCAL_INFO
Definition: local_info.hpp:34
EXPORT_SYMBOLS error & scan_error()
Scanner errors.
Here is the call graph for this function:

◆ setSize()

void Gambit::Priors::BasePrior::setSize ( const unsigned int  size)
inline

Definition at line 79 of file base_prior.hpp.

References size().

Referenced by Gambit::Priors::CompositePrior::CompositePrior().

79 { param_size = size; }
unsigned int size() const
Definition: base_prior.hpp:77
Here is the call graph for this function:
Here is the caller graph for this function:

◆ size()

◆ sizeRef()

unsigned int& Gambit::Priors::BasePrior::sizeRef ( )
inline

Definition at line 81 of file base_prior.hpp.

References param_size.

Referenced by Gambit::Priors::Plugin::Plugin().

81 { return param_size; }
Here is the caller graph for this function:

◆ transform()

virtual void Gambit::Priors::BasePrior::transform ( const std::vector< double > &  ,
std::unordered_map< std::string, double > &   
) const
pure virtual

Member Data Documentation

◆ param_names

◆ param_size

unsigned int Gambit::Priors::BasePrior::param_size
private

Definition at line 43 of file base_prior.hpp.

Referenced by Gambit::Priors::CompositePrior::CompositePrior(), size(), and sizeRef().


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