Delaunator
2D Delaunay Triangulation in C++ with Python wrapper.
 All Classes Namespaces Functions
utils.h
1 #ifndef UTILS_H_INCLUDED
2 #define UTILS_H_INCLUDED
3 
4 
5 
6 /*
7  * LIBRARIES
8  */
9 // STD LIB
10 #include <iostream> /* cerr, endl */
11 #include <fstream> /* ofstream type */
12 #include <sstream> /* streams types */
13 #include <ctime> /* t_clock */
14 #include <cstdlib> /* sleep (WIN32) */
15 #include <cstdarg> /* var-len args */
16 #include <string> /* string type */
17 #include <cstring> /* string function */
18 #include <queue> /* queue type */
19 #include <cfloat> /* FLT_MAX */
20 #ifdef __GNUC__
21 #include <unistd.h> /* sleep (GNUC) */
22 #endif
23 
24 
25 
26 
27 /*
28  * DEFINES
29  */
30 #define FILE_LOGS "logs"
31 //extern unsigned short VERBOSE_LEVEL = 0; // greater it is, more logs there is.
32 
33 
34 
35 /*
36  * PROTOTYPES
37  */
38 void swap(const void*, const void*, const long unsigned int); // universal invertion of a and b. They must use the same memory size. Use the XOR swap algorithm
39 std::string strAfter(const std::string, const std::string); // return the string contains by mainStr after subStr
40 std::string randstr(size_t size, char* caracs); // Return a rand string contain given caracs
41 //void flogs(short, const char* const, ...);
42 //void ologs(short, const char* const, ...);
43 void logs(const char* const, ...);
44 float round_float(const float, const float);
45 
46 // explicit prototypes
47 #include "inlines.h"
48 #include "templates.h"
49 
50 
51 
52 
53 
54 
55 
56 
57 #endif