#ifndef DEXP_H_
#define DEXP_H_
#include <distributions/DistReal.h>
/**
* @short Exponential distribution
* <pre>
* x ~ dexp(lambda)
* f(x | lambda) = lambda * exp(-lambda * x) ; x >= 0
* </pre>
*/
class DExp : public DistReal {
public:
DExp();
~DExp();
double d(double x, std::vector<SArray const *> const ¶meters, bool give_log) const;
double p(double q, std::vector<SArray const *> const ¶meters, bool lower,
bool give_log) const;
double q(double p, std::vector<SArray const *> const ¶meters, bool lower,
bool log_p) const;
double r(std::vector<SArray const *> const ¶meters) const;
/**
* Checks that lambda > 0
*/
bool checkParameterValue(std::vector<SArray const *> const ¶meters) const;
double mean(std::vector<SArray const*> const ¶meters) const;
double var(std::vector<SArray const*> const ¶meters) const;
};
#endif /* DEXP_H_ */
syntax highlighted by Code2HTML, v. 0.9.1