41#define OGDF_ASSERT(expr)
44#define OGDF_HEAVY_ASSERT(expr)
47# ifdef OGDF_HEAVY_DEBUG
48# undef OGDF_HEAVY_ASSERT
49# define OGDF_HEAVY_ASSERT(expr) OGDF_ASSERT(expr)
52# ifndef OGDF_USE_ASSERT_EXCEPTIONS
54# define OGDF_ASSERT(expr) assert(expr)
65 using std::runtime_error::runtime_error;
69# define OGDF_ASSERT(expr) \
72 std::stringstream ogdf_assert_ss; \
73 ogdf_assert_ss << "OGDF assertion `" #expr "' failed at " __FILE__ ":" \
74 << __LINE__ << "(" << OGDF_FUNCTION_NAME << ")"; \
75 ogdf::get_stacktrace(ogdf_assert_ss); \
76 throw ogdf::AssertionFailed(ogdf_assert_ss.str()); \
86#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 5
87# define OGDF_TRIVIALLY_COPYABLE std::has_trivial_copy_assign
89# define OGDF_TRIVIALLY_COPYABLE std::is_trivially_copyable
129#ifdef OGDF_USE_ASSERT_EXCEPTIONS
172 double x2 = 2.0 *
rndVal - 1.0;
173 w = x1 * x1 + x2 * x2;
219template<
typename CONTAINER,
typename T>
222 for (
const T& y : C) {
Abstract base class for bucket functions.
virtual int getBucket(const E &x)=0
Returns the bucket of x.
The class Initialization is used for initializing global variables.
Basic configuration file.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
int searchPos(const CONTAINER &C, const T &x)
Searches for the position of x in container C; returns -1 if not found.
double usedTime(double &T)
Returns used CPU time from T to current time and assigns current time to T.
int randomNumber(int low, int high)
Returns random integer between low and high (including).
double randomDoubleExponential(double beta)
Returns a random double value from the exponential distribution.
double randomDouble(double low, double high)
Returns a random double value from the interval [low, high).
double randomDoubleNormal(double m, double sd)
Returns a random double value from the normal distribution with mean m and standard deviation sd.
void setSeed(int val)
Sets the seed for functions like randomSeed(), randomNumber(), randomDouble().
long unsigned int randomSeed()
Returns a random value suitable as initial seed for a random number engine.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.
bool equalIgnoreCase(const string &str1, const string &str2)
Compares the two strings str1 and str2, ignoring the case of characters.
bool prefixIgnoreCase(const string &prefix, const string &str)
Tests if prefix is a prefix of str, ignoring the case of characters.
void removeTrailingWhitespace(string &str)
Removes trailing space, horizontal and vertical tab, feed, newline, and carriage return from str.
static Initialization s_ogdfInitializer
bool debugMode
Set to true iff debug mode is used during compilation of the OGDF.