Class representing uniform density. More...
#include <uniform.h>
Public Member Functions | |
virtual MatrixWrapper::ColumnVector | CenterGet () const |
Get the center of the uniform. More... | |
virtual Uniform * | Clone () const |
Clone function. More... | |
virtual Probability | ProbabilityGet (const MatrixWrapper::ColumnVector &input) const |
Get the probability of a certain argument. More... | |
bool | SampleFrom (vector< Sample< MatrixWrapper::ColumnVector > > &list_samples, const int num_samples, int method=DEFAULT, void *args=NULL) const |
virtual bool | SampleFrom (Sample< MatrixWrapper::ColumnVector > &one_sample, int method=DEFAULT, void *args=NULL) const |
Uniform (const MatrixWrapper::ColumnVector &Center, const MatrixWrapper::ColumnVector &Width) | |
Constructor. More... | |
Uniform (int dimension=0) | |
constructor with only dimensions or nothing More... | |
void | UniformSet (const MatrixWrapper::ColumnVector ¢er, const MatrixWrapper::ColumnVector &width) |
Set the center and width of the uniform. More... | |
virtual MatrixWrapper::ColumnVector | WidthGet () const |
Get the Width of the uniform distribution. More... | |
virtual | ~Uniform () |
Default Copy Constructor will do. More... | |
Public Member Functions inherited from BFL::BFL::Pdf< MatrixWrapper::ColumnVector > | |
virtual MatrixWrapper::SymmetricMatrix | CovarianceGet () const |
Get the Covariance Matrix E[(x - E[x])^2] of the Analytic pdf. More... | |
unsigned int | DimensionGet () const |
Get the dimension of the argument. More... | |
virtual void | DimensionSet (unsigned int dim) |
Set the dimension of the argument. More... | |
virtual MatrixWrapper::ColumnVector | ExpectedValueGet () const |
Get the expected value E[x] of the pdf. More... | |
Pdf (unsigned int dimension=0) | |
Constructor. More... | |
virtual bool | SampleFrom (vector< Sample< MatrixWrapper::ColumnVector > > &list_samples, const unsigned int num_samples, int method=DEFAULT, void *args=NULL) const |
Draw multiple samples from the Pdf (overloaded) More... | |
virtual bool | SampleFrom (Sample< MatrixWrapper::ColumnVector > &one_sample, int method=DEFAULT, void *args=NULL) const |
Draw 1 sample from the Pdf: More... | |
virtual | ~Pdf () |
Destructor. More... | |
Private Attributes | |
double | _Height |
Height of the uniform distribution. More... | |
MatrixWrapper::ColumnVector | _Higher |
Upper border of the uniform distribution. More... | |
MatrixWrapper::ColumnVector | _Lower |
Lower border of the uniform distribution. More... | |
ColumnVector | _samples |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Uniform &u) |
output stream for Uniform distribution More... | |
BFL::Uniform::Uniform | ( | const MatrixWrapper::ColumnVector & | Center, |
const MatrixWrapper::ColumnVector & | Width | ||
) |
Constructor.
Center | center of the uniform distribution |
Width | width of the uniform distribution |
BFL::Uniform::Uniform | ( | int | dimension = 0 | ) |
constructor with only dimensions or nothing
Definition at line 44 of file uniform.cpp.
|
virtual |
|
virtual |
Get the center of the uniform.
Get the center of the uniform
Definition at line 117 of file uniform.cpp.
|
virtual |
Clone function.
Implements BFL::BFL::Pdf< MatrixWrapper::ColumnVector >.
Definition at line 62 of file uniform.cpp.
|
virtual |
Get the probability of a certain argument.
input | T argument of the Pdf |
Reimplemented from BFL::BFL::Pdf< MatrixWrapper::ColumnVector >.
Definition at line 67 of file uniform.cpp.
bool BFL::Uniform::SampleFrom | ( | vector< Sample< MatrixWrapper::ColumnVector > > & | list_samples, |
const int | num_samples, | ||
int | method = DEFAULT , |
||
void * | args = NULL |
||
) | const |
|
virtual |
void BFL::Uniform::UniformSet | ( | const MatrixWrapper::ColumnVector & | center, |
const MatrixWrapper::ColumnVector & | width | ||
) |
Set the center and width of the uniform.
Set the center and width of the uniform
center | The new center of uniform distribution |
width | The new width of the uniform distribution |
Definition at line 129 of file uniform.cpp.
|
virtual |
Get the Width of the uniform distribution.
Get the Width of the uniform distribution
Definition at line 123 of file uniform.cpp.
|
friend |
output stream for Uniform distribution
Definition at line 54 of file uniform.cpp.
|
private |
|
private |
|
private |