00001 #ifndef utils_dot_H_header
00002 #define utils_dot_H_header
00003
00010
00011 #define MARK std::cout << "now in " << __FILE__ << ", " << __FUNCTION__ << ": line " << __LINE__ << std::endl;
00012
00013
00014
00015 template<typename T> inline T MIN(const T a, const T b) { return (a<=b) ? a : b; }
00016 template<typename T> inline T MAX(const T a, const T b) { return (a>=b) ? a : b; }
00017
00018
00026 class ForbidAssignment
00027 {
00028 public:
00029 inline ForbidAssignment() { }
00030 private:
00031 ForbidAssignment(const ForbidAssignment&);
00032 inline const ForbidAssignment& operator= (const ForbidAssignment&) const { return *this; }
00033
00034
00035 };
00036
00037
00038 #if (__GNUC__ == 3) && (__GNUC_MINOR__ < 4)
00039
00040
00041
00042
00043
00044
00045
00046
00047 template<typename T> inline double sqrt(const T x)
00048 {
00049 return std::sqrt(static_cast<double>(x));
00050 }
00051 template<typename T> inline double log(const T x)
00052 {
00053 return std::log(static_cast<double>(x));
00054 }
00055 #endif
00056
00057
00058 #endif