00001 /* #start# *********************************************************** 00002 00003 Scheduling Simulator 00004 Lehrstuhl f"ur Effiziente Algorithmen 00005 Technische Universit"at M"unchen 00006 00007 File : $Id: SProbabilityDist.h,v 1.3 2003/03/21 15:47:06 taeubig Exp $ 00008 00009 Purpose : base class for all probability distributions 00010 (use operator() to sample) 00011 00012 * #end# ************************************************************* */ 00013 00014 #ifndef SPROBABILITYDIST_H 00015 #define SPROBABILITYDIST_H 00016 00017 #include <LEDA/random_source.h> 00018 00021 class SProbabilityDist { 00022 public: 00023 00027 enum Type { CONST, UNIFORM, GEOMETRIC, BINOMIAL, POISSON, 00028 EXPONENTIAL, BURSTY, SELFSIMILAR, NORMAL, PARETO }; 00029 00034 virtual double getValue() =0; 00035 00039 virtual Type getType() const =0; 00040 00041 virtual double getExpectation() const =0; 00042 00043 00044 protected: 00045 static leda_random_source _rndSrc; 00046 }; 00047 00048 #endif // SPROBABILITYDIST_H