00001 #ifndef __RAS_UTIL__
00002 #define __RAS_UTIL__
00003
00004 #include <iostream>
00005 #include <iomanip>
00006 #include <LEDA/core/string.h>
00007
00008 using leda::string;
00009 using std::istream;
00010 using std::ostream;
00011 using std::setw;
00012
00013
00014
00015
00016 string tab(int aW);
00017 int Max(int a, int b);
00018
00019
00020
00021
00022
00023 class IntPair
00024 {
00025 public:
00026 IntPair();
00027 IntPair(int, int);
00028 IntPair(const IntPair&);
00029
00030 friend istream& operator>> (istream&, IntPair&);
00031 friend ostream& operator<< (ostream&, const IntPair&);
00032 friend int compare(const IntPair&, const IntPair&);
00033
00034 int First() const;
00035 int Start() const;
00036 int Second() const;
00037 int End() const;
00038
00039 int First(int);
00040 int Start(int);
00041 int Second(int);
00042 int End(int);
00043
00044 private:
00045 int mX, mY;
00046 };
00047
00048
00049
00050
00051
00052 struct Triple
00053 {
00054 int Time, ID;
00055 bool Arrive;
00056 };
00057
00058 istream& operator>>(istream& aIS, Triple& aT);
00059 ostream& operator<<(ostream& aOS, const Triple& aT);
00060 int compare(const Triple& aT1, const Triple& aT2);
00061 int compare(const int& a, const int& b);
00062
00063 #endif