00001
00002
00003
00004
00005
00006
00007
00008 #ifndef STANDARD_H
00009 #define STANDARD_H
00010
00011 #include "LaGOConfig.h"
00012
00013 #include <cstdlib>
00014 #include <cstdio>
00015 #include <cmath>
00016 #include <cstring>
00017 #ifdef HAVE_CFLOAT
00018 #include <cfloat>
00019 #endif
00020 #ifdef HAVE_IEEEFP_H
00021 #include <ieeefp.h>
00022 #endif
00023
00024
00025
00026
00027
00028 inline double sqrt(int x) { return sqrt((double)x); }
00029 #ifndef _WIN32
00030 inline long pow(int a, unsigned int b) { return (long)pow((double)a, (double)b); }
00031 inline long pow(int a, int b) { return (long)pow((double)a, (double)b); }
00032 #endif
00033
00034 inline double closestint(const double& x) { return round(x); }
00035 inline double upperint(const double& x) { return ceil(x); }
00036 inline double lowerint(const double& x) { return floor(x); }
00037 inline double integrality_violation(const double& x) { return fabs(x-closestint(x)); }
00038
00041 inline double project(const double& x, const double& low, const double& up) { return x<low ? low : (x>up ? up : x); }
00042
00043 #include <cassert>
00044
00045 #include <iostream>
00046 #include <iomanip>
00047 #include <fstream>
00048
00049 using namespace std;
00050
00051 #ifdef COIN_HAS_FILIB
00052 #define FILIB_AVAILABLE
00053 #endif
00054
00055 #ifdef FILIB_AVAILABLE
00056
00057 #define FILIB_EXTENDED
00058 #include "interval/interval.hpp"
00059 using filib::interval;
00060 template <class Type>
00061 inline bool operator<(const interval<Type>& x, const interval<Type>& y) { return x.slt(y); };
00062 #endif
00063
00064 #include "tools.h"
00065 #include "uservector.h"
00066
00067 #endif // STANDARD_H
00068