#include <SpiralDistribution.h>
Inheritance diagram for PLearn::SpiralDistribution:
Public Types | |
typedef UnconditionalDistribution | inherited |
Public Member Functions | |
SpiralDistribution () | |
virtual void | build () |
simply calls inherited::build() then build_() | |
virtual void | makeDeepCopyFromShallowCopy (map< const void *, void * > &copies) |
Transforms a shallow copy into a deep copy. | |
PLEARN_DECLARE_OBJECT (SpiralDistribution) | |
void | curve (real t, real &x, real &y) const |
computes (x,y) = ( lambda*sin(alpha*t), lambda*cos(alpha*t) ) | |
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 | generate (Vec &x) const |
return a pseudo-random sample generated from the distribution. | |
virtual int | inputsize () const |
inputsize is 2 (or 3 if include_t is set to true) | |
virtual void | resetGenerator (long g_seed) const |
Resets the random number generator used by generate using the given seed. | |
Public Attributes | |
real | lambda |
real | alpha |
real | tmin |
real | tmax |
real | sigma |
real | uniformity |
bool | include_t |
Static Protected Member Functions | |
void | declareOptions (OptionList &ol) |
Declares this class' options. | |
Private Member Functions | |
void | build_ () |
This does the actual building. |
|
Reimplemented from PLearn::UnconditionalDistribution. Definition at line 53 of file SpiralDistribution.h. |
|
Definition at line 47 of file SpiralDistribution.cc. |
|
simply calls inherited::build() then build_()
Reimplemented from PLearn::UnconditionalDistribution. Definition at line 91 of file SpiralDistribution.cc. References build_(). |
|
This does the actual building.
Reimplemented from PLearn::UnconditionalDistribution. Definition at line 79 of file SpiralDistribution.cc. Referenced by build(). |
|
return survival fn = P(X<x)
Reimplemented from PLearn::PDistribution. Definition at line 117 of file SpiralDistribution.cc. References PLERROR. |
|
computes (x,y) = ( lambda*sin(alpha*t), lambda*cos(alpha*t) )
Definition at line 126 of file SpiralDistribution.cc. References alpha, lambda, and x. Referenced by generate(). |
|
Declares this class' options.
Reimplemented from PLearn::UnconditionalDistribution. Definition at line 65 of file SpiralDistribution.cc. References PLearn::declareOption(), and PLearn::OptionList. |
|
return E[X]
Reimplemented from PLearn::PDistribution. Definition at line 120 of file SpiralDistribution.cc. References PLERROR. |
|
return a pseudo-random sample generated from the distribution.
Reimplemented from PLearn::PDistribution. Definition at line 132 of file SpiralDistribution.cc. References PLearn::bounded_uniform(), curve(), PLearn::gaussian_mu_sigma(), inputsize(), PLearn::pow(), PLearn::TVec< T >::resize(), sigma, tmax, tmin, uniformity, and x. |
|
inputsize is 2 (or 3 if include_t is set to true)
Reimplemented from PLearn::PLearner. Definition at line 154 of file SpiralDistribution.cc. References include_t. Referenced by generate(). |
|
return log of probability density log(p(x))
Reimplemented from PLearn::PDistribution. Definition at line 111 of file SpiralDistribution.cc. References PLERROR, and PLearn::Vec. |
|
Transforms a shallow copy into a deep copy.
Reimplemented from PLearn::UnconditionalDistribution. Definition at line 97 of file SpiralDistribution.cc. References PLERROR. |
|
|
|
Resets the random number generator used by generate using the given seed.
Reimplemented from PLearn::PDistribution. Definition at line 157 of file SpiralDistribution.cc. References PLearn::manual_seed(). |
|
return survival fn = P(X>x)
Reimplemented from PLearn::PDistribution. Definition at line 114 of file SpiralDistribution.cc. References PLERROR. |
|
return Var[X]
Reimplemented from PLearn::PDistribution. Definition at line 123 of file SpiralDistribution.cc. References PLearn::Mat, and PLERROR. |
|
Definition at line 62 of file SpiralDistribution.h. Referenced by curve(). |
|
Definition at line 67 of file SpiralDistribution.h. Referenced by inputsize(). |
|
Definition at line 61 of file SpiralDistribution.h. Referenced by curve(). |
|
Definition at line 65 of file SpiralDistribution.h. Referenced by generate(). |
|
Definition at line 64 of file SpiralDistribution.h. Referenced by generate(). |
|
Definition at line 63 of file SpiralDistribution.h. Referenced by generate(). |
|
Definition at line 66 of file SpiralDistribution.h. Referenced by generate(). |