Uniform prior on an interval. More...
#include <prior.h>
Public Member Functions | |
UniformPrior (double low, double high) | |
Set up a UniformPrior on the interval from low to high. | |
UniformPrior (const UniformPrior &original) | |
copy constructor | |
double | pdf (double x) const |
evaluate the pdf of the prior at position x | |
double | dpdf (double x) |
derivative of the pdf of the prior at position x (jumps at lower and upper are replaced by large numbers) | |
double | rand (void) |
draw a random number | |
PsiPrior * | clone (void) const |
clone by value | |
double | mean (void) const |
return the mean | |
double | std (void) const |
return the standard deviation | |
void | shrink (double xmin, double xmax) |
shrink the prior if it is broader than the range between xmin and xmax | |
int | get_code (void) const |
return the typcode of this prior | |
double | cdf (double x) const |
return the typcode of this prior | |
double | getprm (unsigned int prm) const |
double | ppf (double p, double start=NULL) const |
Uniform prior on an interval.
This prior defines a uniform distribution on an interval. It's pdf is thus if and 0 otherwise.