-
Notifications
You must be signed in to change notification settings - Fork 15
/
main.h
127 lines (97 loc) · 2.91 KB
/
main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
/*
* Copyright(C) 2020, Bruno César Ribas <bruno.ribas@unb.br>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2.1 of the GNU Lesser General Public License
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*/
#ifndef __MAINH__
#define __MAINH__
#if defined(__bubblesort__)
#define __bubblesortonly__
#include "bubblesort.h"
#elif defined(__bubblesortsentinela__)
#define __bubblesortSentinelaonly__
#include "bubblesortsentinela.h"
#elif defined(__combsort__)
#define __combsortonly__
#include "combsort.h"
#elif defined(__countingsort__)
#define __countingsortonly__
#include "countingsort.h"
#elif defined(__selectionsort__)
#define __selectionsortonly__
#include "selectionsort.h"
#elif defined(__selectionsortR__)
#define __selectionsortRonly__
#include "selectionsortR.h"
#elif defined(__insertionsortslow__)
#define __insertionsortslowonly__
#include "insertionsortslow.h"
#elif defined(__insertionsort__)
#define __insertionsortonly__
#include "insertionsort.h"
#elif defined(__shellsort__)
#define __shellsortonly__
#include "shellsort.h"
#elif defined(__quicksort__)
#define __quicksortonly__
#include "quicksort.h"
#elif defined(__quicksortinsertion__)
#define __quicksortinsertiononly__
#include "quicksortinsertion.h"
#elif defined(__quicksortM3__)
#define __quicksortM3only__
#include "quicksortM3.h"
#elif defined(__mergesort__)
#define __mergesortonly__
#include "mergesort.h"
#elif defined(__insertionsortmetades__)
#define __insertionsortmetadesonly__
#include "insertionsortmetades.h"
#elif defined(__quicksortM3insertion__)
#define __quicksortM3insertiononly__
#include "quicksortM3insertion.h"
#elif defined(__introsortquickmerge__)
#define __introsortquickmergeonly__
#include "introsortquickmerge.h"
#elif defined(__introsortquickmergelongjmp__)
#define __introsortquickmergelongjmponly__
#include "introsortquickmergelongjmp.h"
#elif defined(__introsortquickheaplongjmp__)
#define __introsortquickheaplongjmponly__
#include "introsortquickheaplongjmp.h"
#elif defined(__systemqsort__)
#define __systemqsortonly__
#include "systemqsort.h"
#elif defined(__pqsortsimple__)
#define __pqsortonly__
#include "pqsortsimple.h"
#elif defined(__heapsort__)
#define __heapsortonly__
#include "heapsort.h"
#elif defined(__radixsort__)
#define __radixsortonly__
#include "radixsort.h"
#elif defined(__redblacktreesort__)
#define __redblacktreesortonly__
#include "redblacktreesort.h"
#elif defined(__cppsort__)
#define __cppsortonly__
#include "cppsort.h"
#elif defined(__bstsort__)
#define __bstsortonly__
#include "bstsort.h"
#elif defined(__dummy__)
#warning "DUMMY SORT, it will not sort"
#define sort ;
#endif
#ifndef sort
#error "NO SORTING ALGORITHM DEFINED"
#endif
#endif