Public Member Functions

UniformPrior Class Reference

Uniform prior on an interval. More...

#include <prior.h>

Inheritance diagram for UniformPrior:
PsiPrior

List of all members.

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
PsiPriorclone (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

Detailed Description

Uniform prior on an interval.

This prior defines a uniform distribution on an interval. It's pdf is thus $u-l$ if $x\in(l,u)$ and 0 otherwise.


The documentation for this class was generated from the following file: