Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

probability/SParetoDist.h

Go to the documentation of this file.
00001 /* #start# ***********************************************************
00002 
00003            Scheduling Simulator
00004         Lehrstuhl f"ur Effiziente Algorithmen
00005            Technische Universit"at M"unchen
00006 
00007  File    : $Id: SParetoDist.h,v 1.2 2003/03/13 19:24:30 taeubig Exp $
00008 
00009  Purpose : pareto probability distributions on an interval
00010 
00011  * #end# ************************************************************* */
00012 
00013 #ifndef SPARETODIST_H
00014 #define SPARETODIST_H
00015 
00016 #include <cassert>
00017 
00018 #include "SProbabilityDist.h"
00019 
00022 class SParetoDist : public SProbabilityDist {
00023 public:
00030   SParetoDist(double left, double right, 
00031         double alpha) : _l(left), _r(right), _a(alpha) {
00032     assert(_l <= _r); 
00033   };
00034 
00037   SParetoDist(const SParetoDist& r) { _l = r._l; _r = r._r; _a = r._a; }
00038   
00043   virtual double getValue();
00044   
00048   virtual Type getType() const { return PARETO; };
00049   virtual double getExpectation() const { 
00050     assert(false);  return 0.0;
00051   }
00052 
00053   double getLower() const { return _l; };
00054   double getUpper() const { return _r; };
00055   void setBounds(const double &left, const double &right, const double &alpha)
00056     { _l = left; _r = right; _a = alpha; assert(_l <= _r); };
00057 
00058 protected:
00059   // the boundaries of the sample interval
00060   double _l;
00061   double _r;
00062   double _a;      // alpha
00063 };
00064 
00065 #endif // SPARETODIST_H

Generated on Thu May 22 16:48:09 2003 for Sketch-it! by doxygen1.2.18