Class representing uniform density. More...
#include <uniform.h>
Public Member Functions | |
virtual MatrixWrapper::ColumnVector | CenterGet () const |
Get the center of the uniform. | |
virtual Uniform * | Clone () const |
Clone function. | |
virtual Probability | ProbabilityGet (const MatrixWrapper::ColumnVector &input) const |
Get the probability of a certain argument. | |
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. | |
Uniform (int dimension=0) | |
constructor with only dimensions or nothing | |
void | UniformSet (const MatrixWrapper::ColumnVector ¢er, const MatrixWrapper::ColumnVector &width) |
Set the center and width of the uniform. | |
virtual MatrixWrapper::ColumnVector | WidthGet () const |
Get the Width of the uniform distribution. | |
virtual | ~Uniform () |
Default Copy Constructor will do. | |
Private Attributes | |
double | _Height |
Height of the uniform distribution. | |
MatrixWrapper::ColumnVector | _Higher |
Upper border of the uniform distribution. | |
MatrixWrapper::ColumnVector | _Lower |
Lower border of the uniform distribution. | |
ColumnVector | _samples |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Uniform &u) |
output stream for Uniform distribution |
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.
BFL::Uniform::~Uniform | ( | ) | [virtual] |
ColumnVector BFL::Uniform::CenterGet | ( | ) | const [virtual] |
Get the center of the uniform.
Get the center of the uniform
Definition at line 117 of file uniform.cpp.
Uniform * BFL::Uniform::Clone | ( | ) | const [virtual] |
Clone function.
Implements BFL::BFL::Pdf< MatrixWrapper::ColumnVector >.
Definition at line 62 of file uniform.cpp.
Probability BFL::Uniform::ProbabilityGet | ( | const MatrixWrapper::ColumnVector & | input | ) | const [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 bool BFL::Uniform::SampleFrom | ( | Sample< MatrixWrapper::ColumnVector > & | one_sample, |
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.
ColumnVector BFL::Uniform::WidthGet | ( | ) | const [virtual] |
Get the Width of the uniform distribution.
Get the Width of the uniform distribution
Definition at line 123 of file uniform.cpp.
std::ostream& operator<< | ( | std::ostream & | os, |
const Uniform & | u | ||
) | [friend] |
output stream for Uniform distribution
Definition at line 54 of file uniform.cpp.
double BFL::Uniform::_Height [private] |
MatrixWrapper::ColumnVector BFL::Uniform::_Higher [private] |
MatrixWrapper::ColumnVector BFL::Uniform::_Lower [private] |
ColumnVector BFL::Uniform::_samples [mutable, private] |