All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Globals.h
Go to the documentation of this file.
1 /*
2  * Globals.h
3  *
4  * Created on: 06.02.2013
5  * Author: Christian Staudt (christian.staudt@kit.edu)
6  */
7 
8 #ifndef GLOBALS_H_
9 #define GLOBALS_H_
10 
11 #include <cstdint>
12 #include <cmath>
13 #include <limits>
14 
15 #include "ext/ttmath/ttmath.h"
16 
17 
18 namespace NetworKit {
20  typedef uint64_t index; // more expressive name for an index into an array
21  typedef uint64_t count; // more expressive name for an integer quantity
22  typedef ttmath::Big<TTMATH_BITS(64),TTMATH_BITS(64)> bigfloat; // big floating point number
23  typedef index node; // node indices are 0-based
24  typedef double edgeweight; // edge weight type
25  typedef index edgeid; // edge id
26 
28  constexpr index none = std::numeric_limits<index>::max(); // value for not existing nodes/edges
29  constexpr edgeweight defaultEdgeWeight = 1.0;
30  constexpr edgeweight nullWeight = 0.0;
31 }
32 
33 #ifdef __INTEL_COMPILER
34 constexpr double PI = 3.141592653589793238462643383279502884197169399375105820974944592307816406286;
35 #else
36 const double PI = 2.0*std::acos(0);
37 #endif
38 
39 // CODE STYLE GUIDELINES: Do not rely on global variables for algorithm parametrization.
40 
41 
42 #endif /* GLOBALS_H_ */
ttmath::Big< TTMATH_BITS(64), TTMATH_BITS(64)> bigfloat
Definition: Globals.h:22
index edgeid
Definition: Globals.h:25
uint64_t index
Typedefs.
Definition: Globals.h:20
constexpr edgeweight nullWeight
Definition: Globals.h:30
uint64_t count
Definition: Globals.h:21
constexpr index none
Constants.
Definition: Globals.h:28
index node
Definition: Globals.h:23
const double PI
Definition: Globals.h:36
Mathematics functions.
constexpr edgeweight defaultEdgeWeight
Definition: Globals.h:29
Big implements the floating point numbers.
Definition: ttmathbig.h:63
double edgeweight
Definition: Globals.h:24