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

model/env/SBroadcast.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: SBroadcast.h,v 1.1 2003/01/24 10:04:59 hall Exp $
00008 
00009  Purpose : 
00010 
00011  * #end# ************************************************************* */
00012 
00013 #ifndef SBROADCAST_H
00014 #define SBROADCAST_H
00015 
00016 // system header files
00017 #include <LEDA/matrix.h>
00018 #include <LEDA/vector.h>
00019 
00020 // project header files
00021 #include "SBroadcastMod.h"
00022 #include "SIdentical.h"
00023 
00024 // -----------------------------------------------------------------------
00031 class SBroadcast : public virtual SIdentical {
00032   TYPEINFO1(SBroadcast, "B", SIdentical);
00033   friend class SBroadcastMod;
00034  public:
00037   SBroadcast() : _mod(*this) {};
00038   
00039   // inherited member functions
00042   virtual SEnvironmentMod &getModifier()
00043     { return _mod; };
00044   
00045   /* Return the number of machines.
00046    */
00047   virtual int getNumOfMachines() const { return _speedsMat.dim1(); };
00048   
00054   virtual const leda_matrix &getSpeedsMatrix() const { 
00055     return _speedsMat; 
00056   };
00063   virtual double getSpeed(int machine, const SJob& job) const {
00064     return 1.0;
00065   };
00066   
00073   virtual const leda_vector &getSpeedsVector() {
00074     return _speedsVec;
00075   }
00079   virtual double getSpeed(int machine) const {
00080     return 1.0;
00081   }
00082 private:
00083   SBroadcastMod _mod;
00084   leda_matrix _speedsMat;
00085   leda_vector _speedsVec;
00086 };
00087 // -----------------------------------------------------------------------
00088 std::ostream& operator<<(std::ostream& out, SBroadcast &env);  
00089 // -----------------------------------------------------------------------
00090 
00091 #endif 

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