#ifndef DIST_REAL_H_
#define DIST_REAL_H_
#include <distributions/DistScalar.h>
/**
* Abstract class for real valued distributions.
*
* @short Real valued distributions
*/
class DistReal : public DistScalar
{
public:
/**
* Constructor
*
* @param name BUGS language name of distribution
*
* @param npar Number of parameters, excluding upper and lower bound
*
* @param support Support of distribution
*
* @param boundable Logical flag indicating whether the distribution
* can be bounded using the T(,) construct.
*/
DistReal(std::string const &name, unsigned int npar,
Support support, bool boundable);
double logLikelihood(SArray const &x,
std::vector<SArray const *> const ¶meters) const;
void randomSample(SArray &x,
std::vector<SArray const *> const ¶meters) const;
/**
* Most real-valued distributions have only scalar parameters. For
* convenience, a default checkParameterDim member function is provided
* that checks returns true if the value and the parameters are all
* scalar. Distributions that do not take scalar parameters need to
* overload this
*/
bool checkParameterDim (std::vector<SArray const *> const ¶meters) const;
};
#endif /* DIST_REAL_H_ */
syntax highlighted by Code2HTML, v. 0.9.1