flat_log.hpp
Go to the documentation of this file.
149 // See factory function map to see how to use this class to quickly create new priors of this kind 167 RangePrior1D(const std::vector<std::string>& param, const Options& options) : BasePrior(param, 1), myparameter(param_names[0]), scale(1.0), shift(0.0), scale_out(1.0), shift_out(0.0) 172 scan_err << "Error! No 'range' keyword found in options supplied for building RangePrior1D prior (i.e. some instance of this, probably 'flat' or 'log')" << scan_end; 184 scan_err << "Invalid input to some prior derived from RangePrior1D (in constructor): 'myparameters' must be a vector of size 1! (has size=" << param.size() << ")" << scan_end; 204 // If the user has specifically set output_scaled_values = false, then remove any scale and shift before outputting. 205 if (options.hasKey("output_scaled_values") and not options.getValue<bool>("output_scaled_values")) 217 void transform(const std::vector<double> &unitpars, std::unordered_map<std::string,double> &output) const 222 std::vector<double> inverse_transform(const std::unordered_map<std::string, double> &physical) const override 230 double operator()(const std::vector<double> &vec) const {return T::prior(vec[0]*scale+shift)*scale;}
Definition: flat_log.hpp:140 Definition: flat_log.hpp:96 Definition: flat_log.hpp:117 Prior object construction routines. Definition: flat_log.hpp:110 bool hasKey(const args &... keys) const Getters for key/value pairs (which is all the options node should contain) Definition: yaml_options.hpp:67 #define scan_err Defined to macros to output errors in the form: scan_err << "error" << scan_end; scan_warn << "warnin... Definition: scanner_utils.hpp:54 void transform(const std::vector< double > &unitpars, std::unordered_map< std::string, double > &output) const Transform from unit hypercube to parameter. Definition: flat_log.hpp:217 Definition: flat_log.hpp:103 RangePrior1D(const std::vector< std::string > ¶m, const Options &options) Definition: flat_log.hpp:167 std::vector< double > inverse_transform(const std::unordered_map< std::string, double > &physical) const override Transform from parameter back to unit hypercube. Definition: flat_log.hpp:222 Definition: flat_log.hpp:132 Template class for 1d priors which need only a "range" option in their constructor. Definition: flat_log.hpp:151 Definition: flat_log.hpp:124 RangePrior1D< flatprior > LOAD_PRIOR(cos, RangePrior1D< cosprior >) LOAD_PRIOR(sin double operator()(const std::vector< double > &vec) const Log of PDF density. Definition: flat_log.hpp:230 |