CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
Modelling_Distribution.h
Go to the documentation of this file.
1 /********************************************************************
2  * Copyright (C) 2021 by Federico Marulli and Giorgio Lesci *
3  * federico.marulli3@unibo.it *
4  * *
5  * This program is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU General Public License as *
7  * published by the Free Software Foundation; either version 2 of *
8  * the License, or (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public *
16  * License along with this program; if not, write to the Free *
17  * Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ********************************************************************/
20 
34 #ifndef __MODELLINGDISTR__
35 #define __MODELLINGDISTR__
36 
37 #include "Cosmology.h"
38 #include "Measure.h"
39 #include "Modelling.h"
40 #include "Cluster.h"
41 
42 
43 // ===================================================================================================
44 
45 
46 namespace cbl {
47 
48  namespace modelling {
49 
57  namespace distribution {
58 
66  struct STR_Distr_model {
67 
69  double k;
70 
74  STR_Distr_model () = default;
75  };
76 
90 
91  protected:
92 
95 
96  public:
97 
102 
108 
113  Modelling_Distribution (const std::shared_ptr<cbl::data::Data> dataset)
114  { m_data = dataset; }
115 
120  virtual ~Modelling_Distribution () = default;
121 
123 
128 
141  void set_model_Distribution (const statistics::PriorDistribution mean_prior, const statistics::PriorDistribution std_prior, const std::string mean_name, const std::string std_name);
142 
165  void set_model_Distribution (const double k, const statistics::PriorDistribution mean_prior, const statistics::PriorDistribution std0_prior, const std::string mean_name, const std::string std0_name, const std::string std_name);
166 
168  };
169 
170 
183  std::vector<double> model_gaussian (const std::vector<double> x, const std::shared_ptr<void> inputs, std::vector<double> &parameter);
184 
203  std::vector<double> model_gaussian2 (const std::vector<double> x, const std::shared_ptr<void> inputs, std::vector<double> &parameter);
204 
205  }
206  }
207 }
208 
209 #endif
The class Cluster.
The class Cosmology.
The class Measure.
The class Modelling.
The class Modelling.
Definition: Modelling.h:64
std::shared_ptr< data::Data > m_data
input data to be modelled
Definition: Modelling.h:69
virtual ~Modelling_Distribution()=default
default destructor
STR_Distr_model m_data_model
the container of fixed parameters
Modelling_Distribution(const std::shared_ptr< cbl::data::Data > dataset)
constuctor
void set_model_Distribution(const statistics::PriorDistribution mean_prior, const statistics::PriorDistribution std_prior, const std::string mean_name, const std::string std_name)
set the parameters of a Gaussian PDF
The class PriorDistribution.
std::vector< double > model_gaussian2(const std::vector< double > x, const std::shared_ptr< void > inputs, std::vector< double > &parameter)
compute a Gaussian PDF, where the standard deviation, , is expressed as
std::vector< double > model_gaussian(const std::vector< double > x, const std::shared_ptr< void > inputs, std::vector< double > &parameter)
compute a Gaussian PDF
The global namespace of the CosmoBolognaLib
Definition: CAMB.h:38
void distribution(std::vector< double > &xx, std::vector< double > &fx, std::vector< double > &err, const std::vector< double > FF, const std::vector< double > WW, const int nbin, const bool linear=true, const std::string file_out=par::defaultString, const double fact=1., const double V1=par::defaultDouble, const double V2=par::defaultDouble, const std::string bin_type="Linear", const bool conv=false, const double sigma=0.)
derive and store the number distribution of a given std::vector
Definition: Func.cpp:1654
STR_Distr_model()=default
default constructor