Implementing issue #272
This commit is contained in:
parent
411803919d
commit
4f2e9e8442
14
typedefs.h
14
typedefs.h
@ -25,7 +25,9 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
#include <climits>
|
#include <climits>
|
||||||
|
#include <cstdlib>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -36,7 +38,7 @@ using namespace std;
|
|||||||
#define STXXL_VERBOSE_LEVEL -100
|
#define STXXL_VERBOSE_LEVEL -100
|
||||||
|
|
||||||
#define INFO(x) do {std::cout << "[info " << __FILE__ << ":" << __LINE__ << "] " << x << std::endl;} while(0);
|
#define INFO(x) do {std::cout << "[info " << __FILE__ << ":" << __LINE__ << "] " << x << std::endl;} while(0);
|
||||||
#define ERR(x) do {std::cerr << "[error " << __FILE__ << ":" << __LINE__ << "] " << x << std::endl; exit(-1);} while(0);
|
#define ERR(x) do {std::cerr << "[error " << __FILE__ << ":" << __LINE__ << "] " << x << std::endl; std::exit(-1);} while(0);
|
||||||
#define WARN(x) do {std::cerr << "[warn " << __FILE__ << ":" << __LINE__ << "] " << x << std::endl;} while(0);
|
#define WARN(x) do {std::cerr << "[warn " << __FILE__ << ":" << __LINE__ << "] " << x << std::endl;} while(0);
|
||||||
|
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
@ -51,11 +53,15 @@ using namespace std;
|
|||||||
#define M_PI 3.14159265358979323846
|
#define M_PI 3.14159265358979323846
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_ROUNDF
|
//Necessary workaround for Windows as VS doesn't implement C99
|
||||||
#include <boost/math/tr1.hpp>
|
#ifdef _MSC_VER
|
||||||
using namespace boost::math;
|
template<typename digitT>
|
||||||
|
digitT round(digitT x) {
|
||||||
|
return std::floor(x + 0.5);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
typedef unsigned int NodeID;
|
typedef unsigned int NodeID;
|
||||||
typedef unsigned int EdgeID;
|
typedef unsigned int EdgeID;
|
||||||
typedef unsigned int EdgeWeight;
|
typedef unsigned int EdgeWeight;
|
||||||
|
Loading…
Reference in New Issue
Block a user