Shark Machine Learning Library
  • About Shark
  • Sourceforge
    • Project Summary
    • Downloads
    • Subversion Repository
  • Getting Started
  • Tutorials
  • FAQ
  • Main Modules
    • ReClaM
    • EALib
    • MOO-EALib
    • Fuzzy
  • Tools
    • Mixture
    • Array
    • Rng
    • LinAlg
    • FileUtil
  • Main Page
  • Classes

Geometric.h

Go to the documentation of this file.
00001 //===========================================================================
00042 //===========================================================================
00043 
00044 
00045 #ifndef __GEOMETRIC_H
00046 #define __GEOMETRIC_H
00047 
00048 #include "Rng/RandomVar.h"
00049 
00050 
00051 //===========================================================================
00091 class Geometric : public RandomVar< long >
00092 {
00093 public:
00094 
00098     Geometric(double mean = 0);
00099 
00104     Geometric(double mean, RNG& r);
00105 
00106 //========================================================================
00123     double mean() const
00124     {
00125         return pMean;
00126     }
00127 
00128 
00129 //========================================================================
00147     void   mean(double newMean)
00148     {
00149         pMean = newMean;
00150     }
00151 
00152 
00156     long operator()(double mean);
00157 
00161     long operator()();
00162 
00166     double p(const long&) const;
00167 
00168 protected:
00169 
00171     double pMean;
00172 };
00173 
00174 #endif  /* !__GEOMETRIC_H */
00175