-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathSortOps.h
More file actions
99 lines (85 loc) · 1.57 KB
/
Copy pathSortOps.h
File metadata and controls
99 lines (85 loc) · 1.57 KB
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
#ifndef _SORT_OPS_H_
#define _SORT_OPS_H_
#include <string>
#include <vector>
#include "Common.h"
void SortCards(Card *cards, unsigned int n);
struct PDILowerCompare
{
bool operator()(const std::pair<double, int> &p1, const std::pair<double, int> &p2)
{
if (p1.first < p2.first)
{
return true;
}
else
{
return false;
}
}
};
extern PDILowerCompare g_pdi_lower_compare;
struct PDUILowerCompare
{
bool operator()(const std::pair<double, unsigned int> &p1,
const std::pair<double, unsigned int> &p2)
{
if (p1.first < p2.first)
{
return true;
}
else
{
return false;
}
}
};
extern PDUILowerCompare g_pdui_lower_compare;
struct PIILowerCompare
{
bool operator()(const std::pair<int, int> &p1, const std::pair<int, int> &p2)
{
if (p1.first < p2.first)
{
return true;
}
else
{
return false;
}
}
};
extern PIILowerCompare g_pii_lower_compare;
struct PDSHigherCompare
{
bool operator()(const std::pair<double, std::string> &p1,
const std::pair<double, std::string> &p2)
{
if (p1.first > p2.first)
{
return true;
}
else
{
return false;
}
}
};
extern PDSHigherCompare g_pds_higher_compare;
struct PFUILowerCompare
{
bool operator()(const std::pair<float, unsigned int> &p1,
const std::pair<float, unsigned int> &p2)
{
if (p1.first < p2.first)
{
return true;
}
else
{
return false;
}
}
};
extern PFUILowerCompare g_pfui_lower_compare;
#endif