The class PriorDistribution.
More...
#include "Headers/PriorDistribution.h"
Inherits cbl::glob::CombinedDistribution.
|
|
| PriorDistribution () |
| default constructor
|
|
| PriorDistribution (const glob::DistributionType priorType, const double value) |
| constructor of a constant distribution More...
|
|
| PriorDistribution (const glob::DistributionType priorType, const double xmin, const double xmax, const int seed=1) |
| constructor of a flat distribution More...
|
|
| PriorDistribution (const glob::DistributionType priorType, const std::vector< double > prior_params, const double xmin, const double xmax, const int seed=1) |
| constructor More...
|
|
| PriorDistribution (const glob::DistributionType priorType, const distribution_func prior_func, const std::shared_ptr< void > prior_fixed_pars, const std::vector< double > prior_pars, const double xmin, const double xmax, const int seed=1) |
| constructor More...
|
|
| PriorDistribution (const glob::DistributionType priorType, const std::vector< double > discrete_values, const std::vector< double > weights, const int seed=1) |
| constructor More...
|
|
| PriorDistribution (const glob::DistributionType priorType, const std::vector< double > var, const std::vector< double > dist, const int nbin, const std::string interpolationType, const int seed=1) |
| constructor More...
|
|
| PriorDistribution (const glob::DistributionType priorType, const std::vector< double > meanVec, const std::vector< std::vector< double >> covMat, const std::vector< double > xMinVec, const std::vector< double > xMaxVec, const int seed=3213) |
| constructor of multidimensional distributions More...
|
|
| PriorDistribution (const std::string filename, const std::string path, const std::vector< int > columns_to_read, const int skip_nlines=0, const int type_data=0, const bool normalize=true, const int distNum=200, const double rMAX=2, const double cell_size=2) |
| constructor of multidimensional distributions from external chains More...
|
|
| ~PriorDistribution ()=default |
| default destructor
|
|
◆ PriorDistribution() [1/8]
cbl::statistics::PriorDistribution::PriorDistribution |
( |
const glob::DistributionType |
priorType, |
|
|
const double |
value |
|
) |
| |
|
inline |
constructor of a constant distribution
- Parameters
-
priorType | the type of distribution to be created |
value | the value to be returned |
Definition at line 77 of file PriorDistribution.h.
◆ PriorDistribution() [2/8]
cbl::statistics::PriorDistribution::PriorDistribution |
( |
const glob::DistributionType |
priorType, |
|
|
const double |
xmin, |
|
|
const double |
xmax, |
|
|
const int |
seed = 1 |
|
) |
| |
|
inline |
constructor of a flat distribution
- Parameters
-
priorType | the type of distribution to be created |
xmin | lower limit of the distribution |
xmax | upper limit of the distribution |
seed | the distribution seed for random sampling |
Definition at line 91 of file PriorDistribution.h.
◆ PriorDistribution() [3/8]
cbl::statistics::PriorDistribution::PriorDistribution |
( |
const glob::DistributionType |
priorType, |
|
|
const std::vector< double > |
prior_params, |
|
|
const double |
xmin, |
|
|
const double |
xmax, |
|
|
const int |
seed = 1 |
|
) |
| |
|
inline |
constructor
- Parameters
-
priorType | the type of distribution to be created |
prior_params | parameters of the distribution function or discrete list of values for discrete distribution |
xmin | lower limit of the distribution |
xmax | upper limit of the distribution |
seed | the distribution seed for random sampling |
Definition at line 108 of file PriorDistribution.h.
◆ PriorDistribution() [4/8]
cbl::statistics::PriorDistribution::PriorDistribution |
( |
const glob::DistributionType |
priorType, |
|
|
const distribution_func |
prior_func, |
|
|
const std::shared_ptr< void > |
prior_fixed_pars, |
|
|
const std::vector< double > |
prior_pars, |
|
|
const double |
xmin, |
|
|
const double |
xmax, |
|
|
const int |
seed = 1 |
|
) |
| |
|
inline |
constructor
- Parameters
-
priorType | the type of distribution to be created |
prior_func | the functional form of the distribution |
prior_fixed_pars | the fixed parameters |
prior_pars | the distribution parameters |
xmin | lower limit of the distribution |
xmax | upper limit of the distribution |
seed | the distribution seed for random sampling |
Definition at line 129 of file PriorDistribution.h.
◆ PriorDistribution() [5/8]
cbl::statistics::PriorDistribution::PriorDistribution |
( |
const glob::DistributionType |
priorType, |
|
|
const std::vector< double > |
discrete_values, |
|
|
const std::vector< double > |
weights, |
|
|
const int |
seed = 1 |
|
) |
| |
|
inline |
constructor
- Parameters
-
priorType | the type of distribution to be created |
discrete_values | list of discrete values |
weights | list of weights for discrete values |
seed | the distribution seed for random sampling |
Definition at line 144 of file PriorDistribution.h.
◆ PriorDistribution() [6/8]
cbl::statistics::PriorDistribution::PriorDistribution |
( |
const glob::DistributionType |
priorType, |
|
|
const std::vector< double > |
var, |
|
|
const std::vector< double > |
dist, |
|
|
const int |
nbin, |
|
|
const std::string |
interpolationType, |
|
|
const int |
seed = 1 |
|
) |
| |
|
inline |
constructor
- Parameters
-
priorType | the type of distribution to be created |
var | vector containing binned values |
dist | list of distribution values for each bin |
nbin | the number of bins |
interpolationType | the kind of interpolation |
seed | the distribution seed for random sampling |
Definition at line 163 of file PriorDistribution.h.
◆ PriorDistribution() [7/8]
cbl::statistics::PriorDistribution::PriorDistribution |
( |
const glob::DistributionType |
priorType, |
|
|
const std::vector< double > |
meanVec, |
|
|
const std::vector< std::vector< double >> |
covMat, |
|
|
const std::vector< double > |
xMinVec, |
|
|
const std::vector< double > |
xMaxVec, |
|
|
const int |
seed = 3213 |
|
) |
| |
|
inline |
constructor of multidimensional distributions
- Parameters
-
priorType | the type of combined distribution to be created (only Gaussian type available for the moment) |
meanVec | vector containing the mean of the distributions |
covMat | the covariance matrix of the multidimensional distribution |
xMinVec | vector containing the minima of the distributions |
xMaxVec | vector containing the maxima of the distributions |
seed | the distribution seed for random sampling |
Definition at line 184 of file PriorDistribution.h.
◆ PriorDistribution() [8/8]
cbl::statistics::PriorDistribution::PriorDistribution |
( |
const std::string |
filename, |
|
|
const std::string |
path, |
|
|
const std::vector< int > |
columns_to_read, |
|
|
const int |
skip_nlines = 0 , |
|
|
const int |
type_data = 0 , |
|
|
const bool |
normalize = true , |
|
|
const int |
distNum = 200 , |
|
|
const double |
rMAX = 2 , |
|
|
const double |
cell_size = 2 |
|
) |
| |
|
inline |
constructor of multidimensional distributions from external chains
- Parameters
-
filename | the name of the file to read |
path | the path where the file is stored |
columns_to_read | vector of integers correspondent to the columns to read. The first columns has index 1. The last number of the vector represents the column with the values of the Posterior distribution |
skip_nlines | the number of lines to skip at the beginning of the file |
type_data | the type of data read as last column: 0 \(\rightarrow\) log(posterior), 1 \(\rightarrow\) posterior, 2 \(\rightarrow\) chi2 |
normalize | if true the posterior distribution is normalized between 0 and 1 |
distNum | the maximum number of points used to interpolate |
rMAX | the radius used to search for close points |
cell_size | the size of cells of the normalised chain mesh (each side has lenght 100) |
Definition at line 219 of file PriorDistribution.h.
The documentation for this class was generated from the following file: