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

model/env/SUniform.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: SUniform.h,v 1.5 2003/01/08 18:57:13 meierb Exp $
00008 
00009  Purpose : 
00010 
00011  RCS-Log:
00012  $Log: SUniform.h,v $
00013  Revision 1.5  2003/01/08 18:57:13  meierb
00014  added randomized release times
00015 
00016  Revision 1.1.1.1  2002/12/02 22:26:19  meierb
00017  my_schedule
00018 
00019  Revision 1.3  2002/11/10 18:05:42  taeubig
00020  namespace and header include changes
00021 
00022  Revision 1.2  2002/11/07 12:33:25  taeubig
00023  Added class keyword to friend declaration
00024 
00025  Revision 1.1  2002/08/29 12:59:59  taeubig
00026  Added the sources
00027 
00028  Revision 1.1  2000/05/29 19:44:39  taeubig
00029  Moved environment related files into subdirectory env
00030 
00031  Revision 1.11  2000/05/24 12:46:32  taeubig
00032  New compiler (gcc-2.95) and new Qt (2.1)
00033  Replaced "list" by "leda_list" etc.
00034 
00035  Revision 1.10  2000/01/13 16:44:13  zoidl
00036  added javadoc comments
00037 
00038  Revision 1.9  1999/12/02 02:26:22  taeubig
00039  Project now compiles with gcc 2.95.2
00040  (inheritance of class SSingle corrected)
00041 
00042  Revision 1.8  1999/06/17 16:34:55  hall
00043  STopology changed, tuned STSysSchedEvent-stuff and lost more!
00044 
00045  Revision 1.7  1999/04/27 13:39:48  schickin
00046  well folks, that's the first demo version that really runs 8-)
00047 
00048  Revision 1.6  1999/03/31 11:13:36  hall
00049  added a few output operators and save routines
00050 
00051  Revision 1.5  1999/03/29 12:49:04  schickin
00052  design of modifiers changed (SFooMod is now a member of SFoo). the stuff
00053  compiles and a simple test program runs fine.
00054 
00055  Revision 1.4  1999/03/23 14:27:02  schickin
00056  a lot of new code in /model: things compile but have no functionality
00057 
00058  Revision 1.3  1999/02/12 11:55:53  hall
00059  impl. SEnvironment slice
00060 
00061  Revision 1.2  1999/01/29 10:04:02  schickin
00062  Project-Headers added.
00063 
00064 
00065  * #end# ************************************************************* */
00066 
00067 #ifndef SUNIFORM_H
00068 #define SUNIFORM_H
00069 
00070 // system header files
00071 #include <LEDA/matrix.h>
00072 #include <LEDA/vector.h>
00073 
00074 // project header files
00075 #include "SUniformMod.h"
00076 #include "SUnrelated.h"
00077 
00085 // -----------------------------------------------------------------------
00086 class SUniform : public virtual SUnrelated {
00087   TYPEINFO1(SUniform, "U", SUnrelated);
00088   friend class SUniformMod;
00089 public:
00090   SUniform() : _mod(*this) {};
00091 
00092   // inherited member functions
00093   
00096   virtual SEnvironmentMod &getModifier()
00097     { return _mod; };
00098   
00099   /* Return the number of machines.
00100    */
00101   virtual int getNumOfMachines() const { return _speedsMat.dim1(); };
00102   
00107   virtual const leda_matrix &getSpeedsMatrix() const { 
00108     return _speedsMat; 
00109   };
00110   
00116   virtual double getSpeed(int machine, const SJob& job) const {
00117     return _speedsVec[machine];
00118   };
00119   
00120   // new member functions
00121   
00127   virtual const leda_vector &getSpeedsVector() {
00128     return _speedsVec;
00129   }
00130 
00134   virtual double getSpeed(int machine) const {
00135     return _speedsVec[machine];
00136   }
00137 
00138 private:
00139   SUniformMod _mod;
00140   leda_matrix _speedsMat;
00141   leda_vector _speedsVec;
00142 };
00143 // -----------------------------------------------------------------------
00144 std::ostream& operator<<(std::ostream& out, SUniform &env);  
00145 // -----------------------------------------------------------------------
00146 
00147 #endif //SUNIFORM_H

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