MuGen
Multitrait genetics
|
Dirichlet-multinomial mixture prior. More...
#include <MuGen.h>
Public Member Functions | |
MixP () | |
Default constructor. | |
MixP (const vector< double > &initP) | |
Constructor with a vector of proportions. More... | |
MixP (const gsl_vector *initP) | |
Constructor with a GSL vector of proportions. More... | |
MixP (const vector< double > &initP, const double &a) | |
Constructor with a vector of proportions and a single prior class size. More... | |
MixP (const gsl_vector *initP, const double &a) | |
Constructor with a GSL vector of proportions and a single prior class size. More... | |
MixP (const vector< double > &initP, const double *a, const size_t &len) | |
Constructor with a vector of proportions and an array of prior class sizes. More... | |
MixP (const gsl_vector *initP, const double *a) | |
Constructor with a GSL vector of proportions and an array of prior class sizes. More... | |
MixP (const vector< double > &initP, const vector< double > &a) | |
Constructor with a vector of proportions and a vector of prior class sizes. More... | |
MixP (const gsl_vector *initP, const vector< double > &a) | |
Constructor with a GSL vector of proportions and a vector of prior class sizes. More... | |
MixP (const RanIndex &ind, const double &a) | |
Constructor with a RanIndex of group IDs and a vector of prior class sizes. More... | |
~MixP () | |
Destructor. | |
MixP (const MixP &) | |
Copy constructor. More... | |
MixP & | operator= (const MixP &) |
Assignement operator. More... | |
const double & | operator[] (const size_t i) const |
Subscript operator. More... | |
void | update (const RanIndex &Nvec) |
Gibbs update function. More... | |
Dirichlet-multinomial mixture prior.
Implements the Dirichlet-multinomial prior on proportions in a mixture of Gaussians.
|
inline |
Constructor with a vector of proportions.
The prior is set to all ones, i.e. the vaguest possible.
[in] | vector<double>& | vector of initial proportions |
MixP::MixP | ( | const gsl_vector * | initP | ) |
Constructor with a GSL vector of proportions.
The prior is set to all ones, i.e. the vaguest possible.
[in] | gsl_vector* | vector of initial proportions |
MixP::MixP | ( | const vector< double > & | initP, |
const double & | a | ||
) |
Constructor with a vector of proportions and a single prior class size.
The prior for each mixture category is set to the same provided value.
[in] | vector<double>& | vector of initial proportions |
[in] | double& | prior category size |
MixP::MixP | ( | const gsl_vector * | initP, |
const double & | a | ||
) |
Constructor with a GSL vector of proportions and a single prior class size.
The prior for each mixture category is set to the same provided value.
[in] | gsl_vector* | vector of initial proportions |
[in] | double& | prior category size |
MixP::MixP | ( | const vector< double > & | initP, |
const double * | a, | ||
const size_t & | len | ||
) |
Constructor with a vector of proportions and an array of prior class sizes.
The prior for each mixture category is set to the corresponding value in the array.
[in] | vector<double>& | vector of initial proportions |
[in] | double* | prior category size |
[in] | size_t& | prior array length |
MixP::MixP | ( | const gsl_vector * | initP, |
const double * | a | ||
) |
Constructor with a GSL vector of proportions and an array of prior class sizes.
The prior for each mixture category is set to the corresponding value in the array.
[in] | gsl_vector* | vector of initial proportions |
[in] | double* | prior category size |
MixP::MixP | ( | const vector< double > & | initP, |
const vector< double > & | a | ||
) |
Constructor with a vector of proportions and a vector of prior class sizes.
The prior for each mixture category is set to the corresponding value in the vector.
[in] | vector<double>& | vector of initial proportions |
[in] | vector<double>& | prior category size |
MixP::MixP | ( | const gsl_vector * | initP, |
const vector< double > & | a | ||
) |
Constructor with a GSL vector of proportions and a vector of prior class sizes.
The prior for each mixture category is set to the corresponding value in the vector.
[in] | gsl_vector* | vector of initial proportions |
[in] | vector<double> | prior category size |
MixP::MixP | ( | const RanIndex & | ind, |
const double & | a | ||
) |
Constructor with a RanIndex of group IDs and a vector of prior class sizes.
The prior for each mixture category is set to the same provided value. The proportions are calculated using the data in the RanIndex object.
[in] | gsl_vector* | vector of initial proportions |
[in] | double& | prior category size |
MixP::MixP | ( | const MixP & | mp | ) |
Copy constructor.
[in] | MixP& | object to be copied |
|
inline |
Subscript operator.
[in] | size_t& | index of the category |