
Definition at line 21 of file UniformPdf.hpp.
Public Member Functions | |
| UniformPdf () | |
| Default constructor. | |
| UniformPdf (const vector &lower, const vector &upper) | |
| Constructor. | |
| ~UniformPdf () | |
| Destructor. | |
| virtual UniformPdf & | operator= (const UniformPdf &o) |
| Assignment operator. | |
| virtual void | setDimensions (const unsigned int N, const bool preserve=false) |
| Set the dimensionality of the distribution. | |
| virtual const vector & | getExpectation () |
| Get the expected value of the distribution. | |
| virtual const symmetric_matrix & | getCovariance () |
| Get the covariance of the distribution. | |
| virtual vector | sample () |
| Sample from the distribution. | |
| virtual double | densityAt (const vector &x) |
| Calculate the density at a given point. | |
| UniformPdf | ( | ) |
Default constructor.
Initialises the distribution with zero dimensions. This should generally only be used when the object is to be restored from a serialization.
Definition at line 6 of file UniformPdf.cpp.
| UniformPdf | ( | const vector & | lower, | |
| const vector & | upper | |||
| ) |
Constructor.
| lower | Lower corner of the hyper-rectangle under the distribution. | |
| upper | Upper corner of the hyper-rectangle under the distribution. |
Definition at line 11 of file UniformPdf.cpp.
| ~UniformPdf | ( | ) |
| UniformPdf & operator= | ( | const UniformPdf & | o | ) | [virtual] |
Assignment operator.
Both sides must have the same dimensionality.
Definition at line 20 of file UniformPdf.cpp.
| void setDimensions | ( | const unsigned int | N, | |
| const bool | preserve = false | |||
| ) | [virtual] |
Set the dimensionality of the distribution.
| N | Dimensionality of the distribution. | |
| preserve | True to preserve the current sufficient statistics of the distribution in the lower dimensional space, false if these may be discarded. |
Implements Pdf.
Definition at line 44 of file UniformPdf.cpp.
| const vector & getExpectation | ( | ) | [virtual] |
Get the expected value of the distribution.
; expected value of the distribution. Implements Pdf.
Definition at line 55 of file UniformPdf.cpp.
| const symmetric_matrix & getCovariance | ( | ) | [virtual] |
Get the covariance of the distribution.
; covariance of the distribution. Implements Pdf.
Definition at line 62 of file UniformPdf.cpp.
| vector sample | ( | ) | [virtual] |
Sample from the distribution.
Implements Pdf.
Definition at line 69 of file UniformPdf.cpp.
| double densityAt | ( | const vector & | x | ) | [virtual] |
Calculate the density at a given point.
| x | ; point at which to evaluate the density. |
; the density at
. Implements Pdf.
Definition at line 79 of file UniformPdf.cpp.
1.5.3