00001 /* #start# *********************************************************** 00002 00003 Scheduling Simulator 00004 Lehrstuhl f"ur Effiziente Algorithmen 00005 Technische Universit"at M"unchen 00006 00007 File : $Id: SExpDist.h,v 1.3 2003/04/12 11:34:56 meierb Exp $ 00008 00009 Purpose : 00010 00011 * #end# ************************************************************* */ 00012 00013 #ifndef SEXPDIST_H 00014 #define SEXPDIST_H 00015 00016 #include "SProbabilityDist.h" 00017 00022 class SExpDist : public SProbabilityDist { 00023 public: 00024 SExpDist() : 00025 _p(0.0) 00026 {} 00027 00035 SExpDist(double mean) : 00036 _p(1/mean) 00037 {}; 00038 00041 SExpDist(const SExpDist& rU) 00042 { _p = rU._p;} 00043 00044 virtual double getValue(); 00045 00046 virtual double getExpectation() const; 00047 00051 virtual Type getType() const 00052 { return EXPONENTIAL; } 00053 00054 double getLambda() const { return _p; }; 00055 00056 protected: 00058 double _p; 00059 }; 00060 00061 #endif