/* * RandomNumberDistribution.hpp * * Created on: Jan 01, 2011 * Author: heber */ #ifndef RANDOMNUMBERDISTRIBUTION_HPP_ #define RANDOMNUMBERDISTRIBUTION_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include class RandomNumberDistributionFactoryTest; class RandomNumberGenerator; class RandomNumberDistribution_Parameters; /** Abstract base class for a random number distribution. * * This class represents the interface to the random number distribution. * Hence, they all can be accessed the same way. * * It is also the base class that is needed for RandomNumberGeneratorFactory. */ class RandomNumberDistribution { /** * test has to access cstor/dstor. */ friend class RandomNumberDistributionFactoryTest; /** * RandomNumberGenerator(_Encapsulation) needs access to dstor. */ friend class RandomNumberGenerator; public: /** Getter for the whole set of possible parameters. * * @return filled instance of RandomNumberDistribution_Parameters */ virtual RandomNumberDistribution_Parameters* getParameterSet() const=0; /** Getter for smallest value the uniform_... engines produces. * * @return smallest value */ virtual double min() const=0; /** Getter for largest value the uniform_... engines produces. * * @return largest value */ virtual double max() const=0; /** Getter for bernoulli_distribution probability p. * * @return p */ virtual double p() const=0; /** Getter for binomial_distribution's parameter t. * * @return t */ virtual double t() const=0; /** Getter for cauchy_distribution parameter median. * * @return median */ virtual double median() const=0; /** Getter for cauchy_distribution parameter sigma. * * @return sigma */ virtual double sigma() const=0; /** Getter for gamma_distribution parameter alpha. * * @return alpha */ virtual double alpha() const=0; /** Getter for poisson_distribution's parameter mean. * * @return mean */ virtual double mean() const=0; /** Getter for triangle_distribution parameter a. * * @return a */ virtual double a() const=0; /** Getter for triangle_distribution parameter b. * * @return b */ virtual double b() const=0; /** Getter for triangle_distribution parameter c. * * @return c */ virtual double c() const=0; /** Getter for exponential_distribution parameter lambda. * * @return lambda */ virtual double lambda() const=0; /** Getter for the type name of the internal distribution. * * @return name of distribution */ virtual std::string name()=0; /** Destructor of class RandomNumberDistribution. * * @note must be public such that instances from factory can be destroyed. * */ virtual ~RandomNumberDistribution() {}; protected: /** Constructor of class RandomNumberDistribution. * * @note is protected such that instances can only be created by the factory. */ RandomNumberDistribution() {}; }; #endif /* RANDOMNUMBERDISTRIBUTION_HPP_ */