
-function probability density.
Definition at line 19 of file DiracPdf.hpp.
Public Member Functions | |
| DiracPdf () | |
| Default constructor. | |
| DiracPdf (const vector &x) | |
| Constructor. | |
| DiracPdf (unsigned int N) | |
| Construct Dirac given dimensionality. | |
| virtual | ~DiracPdf () |
| Destructor. | |
| virtual void | setDimensions (const unsigned int N, const bool preserve=false) |
| Set the dimensionality of the distribution. | |
| virtual const vector & | getExpectation () const |
| Get the expected value of the Dirac. | |
| virtual const symmetric_matrix & | getCovariance () const |
| (Don't) get the covariance of the Dirac. | |
| 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. | |
| DiracPdf | ( | ) |
Default constructor.
Initialises the Dirac with zero dimensions. This should generally only be used when the object is to be restored from a serialization. Indeed, there is no other way to resize the Dirac to nonzero dimensionality except by subsequently restoring from a serialization.
Definition at line 11 of file DiracPdf.cpp.
Constructor.
| x | The expectation of the Dirac. |
Definition at line 15 of file DiracPdf.cpp.
| DiracPdf | ( | unsigned int | N | ) |
Construct Dirac given dimensionality.
The expectation remains uninitialised, and should be set with setExpectation().
| N | ; number of dimensions of the Dirac. |
Definition at line 19 of file DiracPdf.cpp.
| ~DiracPdf | ( | ) | [virtual] |
| 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 27 of file DiracPdf.cpp.
| const indii::ml::aux::vector & getExpectation | ( | ) | const [inline, virtual] |
Get the expected value of the Dirac.
; expected value of the Dirac. Definition at line 98 of file DiracPdf.hpp.
| const symmetric_matrix & getCovariance | ( | ) | const [virtual] |
(Don't) get the covariance of the Dirac.
; covariance of the Dirac.
Definition at line 32 of file DiracPdf.cpp.
| const indii::ml::aux::vector & getExpectation | ( | ) | [inline, virtual] |
Get the expected value of the distribution.
; expected value of the distribution. Implements Pdf.
Definition at line 103 of file DiracPdf.hpp.
| const symmetric_matrix & getCovariance | ( | ) | [virtual] |
Get the covariance of the distribution.
; covariance of the distribution. Implements Pdf.
Definition at line 38 of file DiracPdf.cpp.
| indii::ml::aux::vector sample | ( | ) | [inline, virtual] |
Sample from the distribution.
Implements Pdf.
Definition at line 107 of file DiracPdf.hpp.
| double densityAt | ( | const vector & | x | ) | [inline, virtual] |
Calculate the density at a given point.
| x | ; point at which to evaluate the density. |
; the density at
. Implements Pdf.
Definition at line 111 of file DiracPdf.hpp.
1.5.3