#ifndef DINTERVAL_H_ #define DINTERVAL_H_ #include /** * @short Interval censored distribution *
 * i ~ dinterval(t, cutpoints[])
 * f(i|t) = 1 if t < cutpoints[i] and t >= cutpoints[i-1]
 *        = 0 otherwise
 * 
*/ class DInterval : public Distribution { public: DInterval(); ~DInterval(); double logLikelihood(SArray const &x, std::vector const ¶meters) const; void randomSample(SArray &x, std::vector const ¶meters) const; /** * Checks that t is scalar and that cutpoints is a vector */ bool checkParameterDim(std::vector const ¶meters) const; /** * Checks that cutpoints are in ascending order */ bool checkParameterValue(std::vector const ¶meters) const; Index const &dim(std::vector const ¶meters) const; /** * Returns zero */ unsigned long df(std::vector const ¶meters) const; double lowerSupport(unsigned long i, std::vector const ¶meters) const; double upperSupport(unsigned long i, std::vector const ¶meters) const; }; #endif /* DINTERVAL_H_ */