51   namespace statistics {
 
   91       Model1D (
const model_function_1D function, 
const size_t nparameters, std::vector<ParameterType> parameterTypes={}, std::vector<std::string> parameterNames={}, 
const std::shared_ptr<void> 
inputs=NULL) : 
Model(nparameters, parameterTypes, parameterNames, 
inputs)
 
  109       Model1D (
const std::vector<double> (*
function)(
const std::vector<double> xx, std::vector<double> &val), 
const size_t nparameters, std::vector<ParameterType> parameterTypes={}, std::vector<std::string> parameterNames={}, 
const std::shared_ptr<void> 
inputs=NULL) : 
Model(nparameters, parameterTypes, parameterNames, 
inputs)
 
  140       void set_function (
const std::vector<double> (*
function)(
const std::vector<double> xx, std::vector<double> &val));
 
  153     std::vector<std::vector<double>> xvec(1, std::vector<double>(1, xx));
 
  170     std::vector<std::vector<double>> xvec(1, xx);
 
  186       void stats_from_chains (
const std::vector<double> xx, std::vector<double> &median_model, std::vector<double> &low_model, std::vector<double> &up_model, 
const int start=0, 
const int thin=1) 
override;
 
  201       void write (
const std::string output_dir, 
const std::string output_file, 
const std::vector<double> xx, 
const std::vector<double> 
parameters) 
override;
 
  214       void write_at_bestfit (
const std::string output_dir, 
const std::string output_file, 
const std::vector<double> xx) 
override;
 
  229       void write_from_chains (
const std::string output_dir, 
const std::string output_file, 
const std::vector<double> xx, 
const int start=0, 
const int thin=1) 
override;
 
void write(const std::string output_dir, const std::string output_file, const std::vector< double > xx, const std::vector< double > parameters) override
write the model at xx for given parameters
void write_from_chains(const std::string output_dir, const std::string output_file, const std::vector< double > xx, const int start=0, const int thin=1) override
write the model at xx computing 16th, 50th and 84th percentiles from the chains.
Model1D(const std::vector< double >(*function)(const std::vector< double > xx, std::vector< double > &val), const size_t nparameters, std::vector< ParameterType > parameterTypes={}, std::vector< std::string > parameterNames={}, const std::shared_ptr< void > inputs=NULL)
constructor
Model1D()
default constructor
void write_at_bestfit(const std::string output_dir, const std::string output_file, const std::vector< double > xx) override
write the model at xx with best-fit parameters obtained from likelihood maximization
void set_function(const model_function_1D function)
set the model function
double operator()(const double xx, std::vector< double > ¶meters) const override
evaluate the model function at xx
Model1D(const model_function_1D function, const size_t nparameters, std::vector< ParameterType > parameterTypes={}, std::vector< std::string > parameterNames={}, const std::shared_ptr< void > inputs=NULL)
constructor
~Model1D()=default
default destructor
void stats_from_chains(const std::vector< double > xx, std::vector< double > &median_model, std::vector< double > &low_model, std::vector< double > &up_model, const int start=0, const int thin=1) override
compute the median and percentiles of the model from MCMC chains
std::shared_ptr< ModelParameters > parameters()
return the model parameters
Dim m_dimension
the model dimension
std::vector< std::vector< double > > operator()(const std::vector< std::vector< double >> xx, std::vector< double > ¶meters) const
evalueate the model function at xx, for Model1D
Model()=default
default constructor
std::shared_ptr< void > inputs()
return the model inputs
std::function< std::vector< double >std::vector< double >, std::shared_ptr< void >, std::vector< double > &)> model_function_1D
1D function: the inputs are a vector of values at which the function is computed, a pointer to a set ...
The global namespace of the  CosmoBolognaLib
@ _1D_
1D, used e.g. for 1D pairs, in angular or comoving separations