Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

PLearn::UniformDistribution Class Reference

#include <UniformDistribution.h>

Inheritance diagram for PLearn::UniformDistribution:

Inheritance graph
[legend]
Collaboration diagram for PLearn::UniformDistribution:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 UniformDistribution ()
 Default constructor.

virtual void build ()
 Simply call inherited::build() then build_().

virtual void makeDeepCopyFromShallowCopy (map< const void *, void * > &copies)
 Transform a shallow copy into a deep copy.

 PLEARN_DECLARE_OBJECT (UniformDistribution)
virtual int inputsize () const
 Overridden so that it does not need a training set.

virtual real log_density (const Vec &x) const
 Return log of probability density log(p(x)).

virtual real survival_fn (const Vec &x) const
 Return survival fn = P(X>x).

virtual real cdf (const Vec &x) const
 Return survival fn = P(X<x).

virtual void expectation (Vec &mu) const
 Return E[X].

virtual void variance (Mat &cov) const
 Return Var[X].

virtual void resetGenerator (long g_seed) const
 Reset the random number generator used by generate() using the given seed.

virtual void generate (Vec &x) const
 Return a pseudo-random sample generated from the distribution.


Public Attributes

Vec max
Vec min

Static Protected Member Functions

void declareOptions (OptionList &ol)
 Declare this class' options.


Private Types

typedef UnconditionalDistribution inherited

Private Member Functions

void build_ ()
 This does the actual building.


Member Typedef Documentation

typedef UnconditionalDistribution PLearn::UniformDistribution::inherited [private]
 

Reimplemented from PLearn::UnconditionalDistribution.

Definition at line 57 of file UniformDistribution.h.


Constructor & Destructor Documentation

PLearn::UniformDistribution::UniformDistribution  ) 
 

Default constructor.

Definition at line 52 of file UniformDistribution.cc.

References max, min, and PLearn::TVec< T >::resize().


Member Function Documentation

void PLearn::UniformDistribution::build  )  [virtual]
 

Simply call inherited::build() then build_().

Reimplemented from PLearn::UnconditionalDistribution.

Definition at line 87 of file UniformDistribution.cc.

References build_().

void PLearn::UniformDistribution::build_  )  [private]
 

This does the actual building.

Reimplemented from PLearn::UnconditionalDistribution.

Definition at line 96 of file UniformDistribution.cc.

References PLearn::TVec< T >::length(), max, min, and PLERROR.

Referenced by build().

real PLearn::UniformDistribution::cdf const Vec x  )  const [virtual]
 

Return survival fn = P(X<x).

Reimplemented from PLearn::PDistribution.

Definition at line 121 of file UniformDistribution.cc.

References PLERROR.

void PLearn::UniformDistribution::declareOptions OptionList ol  )  [static, protected]
 

Declare this class' options.

Reimplemented from PLearn::UnconditionalDistribution.

Definition at line 72 of file UniformDistribution.cc.

References PLearn::declareOption(), and PLearn::OptionList.

void PLearn::UniformDistribution::expectation Vec mu  )  const [virtual]
 

Return E[X].

Reimplemented from PLearn::PDistribution.

Definition at line 129 of file UniformDistribution.cc.

References PLERROR.

void PLearn::UniformDistribution::generate Vec x  )  const [virtual]
 

Return a pseudo-random sample generated from the distribution.

Reimplemented from PLearn::PDistribution.

Definition at line 137 of file UniformDistribution.cc.

References PLearn::bounded_uniform(), PLearn::TVec< T >::length(), max, min, and x.

int PLearn::UniformDistribution::inputsize  )  const [virtual]
 

Overridden so that it does not need a training set.

Reimplemented from PLearn::PLearner.

Definition at line 148 of file UniformDistribution.cc.

References PLearn::TVec< T >::length(), and min.

real PLearn::UniformDistribution::log_density const Vec x  )  const [virtual]
 

Return log of probability density log(p(x)).

Reimplemented from PLearn::PDistribution.

Definition at line 155 of file UniformDistribution.cc.

References PLERROR.

void PLearn::UniformDistribution::makeDeepCopyFromShallowCopy map< const void *, void * > &  copies  )  [virtual]
 

Transform a shallow copy into a deep copy.

Reimplemented from PLearn::UnconditionalDistribution.

Definition at line 163 of file UniformDistribution.cc.

References PLERROR.

PLearn::UniformDistribution::PLEARN_DECLARE_OBJECT UniformDistribution   ) 
 

void PLearn::UniformDistribution::resetGenerator long  g_seed  )  const [virtual]
 

Reset the random number generator used by generate() using the given seed.

Reimplemented from PLearn::PDistribution.

Definition at line 180 of file UniformDistribution.cc.

References PLearn::manual_seed().

real PLearn::UniformDistribution::survival_fn const Vec x  )  const [virtual]
 

Return survival fn = P(X>x).

Reimplemented from PLearn::PDistribution.

Definition at line 188 of file UniformDistribution.cc.

References PLERROR.

void PLearn::UniformDistribution::variance Mat cov  )  const [virtual]
 

Return Var[X].

Reimplemented from PLearn::PDistribution.

Definition at line 196 of file UniformDistribution.cc.

References PLearn::Mat, and PLERROR.


Member Data Documentation

Vec PLearn::UniformDistribution::max
 

Definition at line 71 of file UniformDistribution.h.

Referenced by build_(), generate(), and UniformDistribution().

Vec PLearn::UniformDistribution::min
 

Definition at line 72 of file UniformDistribution.h.

Referenced by build_(), generate(), inputsize(), and UniformDistribution().


The documentation for this class was generated from the following files:
Generated on Tue Aug 17 16:27:21 2004 for PLearn by doxygen 1.3.7