00001 /* #start# *********************************************************** 00002 00003 Scheduling Simulator 00004 Lehrstuhl f"ur Effiziente Algorithmen 00005 Technische Universit"at M"unchen 00006 00007 File : $Id: SNormalDist.h,v 1.3 2003/04/12 11:34:56 meierb Exp $ 00008 00009 Purpose : 00010 00011 * #end# ************************************************************* */ 00012 00013 #ifndef SNORMALDIST_H 00014 #define SNORMALDIST_H 00015 00016 #include "SProbabilityDist.h" 00017 00022 class SNormalDist : public SProbabilityDist { 00023 public: 00029 SNormalDist(double exp, double var) : 00030 _e(exp), _v(var) 00031 { 00032 filled = false; 00033 }; 00034 00037 SNormalDist(const SNormalDist& rU) 00038 { _e = rU._e; _v = rU._v;} 00039 00044 virtual double getValue(); 00045 00049 virtual Type getType() const 00050 { return NORMAL; }; 00051 00052 virtual double getExpectation() const 00053 { return _e; }; 00054 00055 virtual double getVariance() const 00056 { return _v; }; 00057 00058 protected: 00059 // the parameter of the distribution 00060 double _e; 00061 double _v; 00062 00063 // buffer variables 00064 double buf; 00065 bool filled; 00066 00067 }; 00068 00069 #endif 00070