forked from huandu/skiplist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
var.go
192 lines (171 loc) · 5.83 KB
/
var.go
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
// A golang Skip List Implementation.
// https://github.com/huandu/skiplist/
//
// Copyright 2011, Huan Du
// Licensed under the MIT license
// https://github.com/huandu/skiplist/blob/master/LICENSE
//
// This file is generated by gen_compare_funcs.sh.
// Don't edit manually.
package skiplist
import "bytes"
const PROPABILITY = 0x3FFF
var (
DefaultMaxLevel int = 32
defaultSource = defaultRandSource{}
Byte GreaterThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(byte) > rhs.(byte)
}
ByteAscending = Byte
ByteAsc = Byte
ByteDescending LessThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(byte) < rhs.(byte)
}
ByteDesc LessThanFunc = ByteDescending
Float32 GreaterThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(float32) > rhs.(float32)
}
Float32Ascending = Float32
Float32Asc = Float32
Float32Descending LessThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(float32) < rhs.(float32)
}
Float32Desc LessThanFunc = Float32Descending
Float64 GreaterThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(float64) > rhs.(float64)
}
Float64Ascending = Float64
Float64Asc = Float64
Float64Descending LessThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(float64) < rhs.(float64)
}
Float64Desc LessThanFunc = Float64Descending
Int GreaterThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(int) > rhs.(int)
}
IntAscending = Int
IntAsc = Int
IntDescending LessThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(int) < rhs.(int)
}
IntDesc LessThanFunc = IntDescending
Int16 GreaterThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(int16) > rhs.(int16)
}
Int16Ascending = Int16
Int16Asc = Int16
Int16Descending LessThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(int16) < rhs.(int16)
}
Int16Desc LessThanFunc = Int16Descending
Int32 GreaterThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(int32) > rhs.(int32)
}
Int32Ascending = Int32
Int32Asc = Int32
Int32Descending LessThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(int32) < rhs.(int32)
}
Int32Desc LessThanFunc = Int32Descending
Int64 GreaterThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(int64) > rhs.(int64)
}
Int64Ascending = Int64
Int64Asc = Int64
Int64Descending LessThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(int64) < rhs.(int64)
}
Int64Desc LessThanFunc = Int64Descending
Int8 GreaterThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(int8) > rhs.(int8)
}
Int8Ascending = Int8
Int8Asc = Int8
Int8Descending LessThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(int8) < rhs.(int8)
}
Int8Desc LessThanFunc = Int8Descending
Rune GreaterThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(rune) > rhs.(rune)
}
RuneAscending = Rune
RuneAsc = Rune
RuneDescending LessThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(rune) < rhs.(rune)
}
RuneDesc LessThanFunc = RuneDescending
String GreaterThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(string) > rhs.(string)
}
StringAscending = String
StringAsc = String
StringDescending LessThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(string) < rhs.(string)
}
StringDesc LessThanFunc = StringDescending
Uint GreaterThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(uint) > rhs.(uint)
}
UintAscending = Uint
UintAsc = Uint
UintDescending LessThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(uint) < rhs.(uint)
}
UintDesc LessThanFunc = UintDescending
Uint16 GreaterThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(uint16) > rhs.(uint16)
}
Uint16Ascending = Uint16
Uint16Asc = Uint16
Uint16Descending LessThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(uint16) < rhs.(uint16)
}
Uint16Desc LessThanFunc = Uint16Descending
Uint32 GreaterThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(uint32) > rhs.(uint32)
}
Uint32Ascending = Uint32
Uint32Asc = Uint32
Uint32Descending LessThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(uint32) < rhs.(uint32)
}
Uint32Desc LessThanFunc = Uint32Descending
Uint64 GreaterThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(uint64) > rhs.(uint64)
}
Uint64Ascending = Uint64
Uint64Asc = Uint64
Uint64Descending LessThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(uint64) < rhs.(uint64)
}
Uint64Desc LessThanFunc = Uint64Descending
Uint8 GreaterThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(uint8) > rhs.(uint8)
}
Uint8Ascending = Uint8
Uint8Asc = Uint8
Uint8Descending LessThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(uint8) < rhs.(uint8)
}
Uint8Desc LessThanFunc = Uint8Descending
Uintptr GreaterThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(uintptr) > rhs.(uintptr)
}
UintptrAscending = Uintptr
UintptrAsc = Uintptr
UintptrDescending LessThanFunc = func(lhs, rhs interface{}) bool {
return lhs.(uintptr) < rhs.(uintptr)
}
UintptrDesc LessThanFunc = UintptrDescending
// the type []byte.
Bytes GreaterThanFunc = func(lhs, rhs interface{}) bool {
return bytes.Compare(lhs.([]byte), rhs.([]byte)) > 0
}
BytesAscending = Bytes
BytesAsc = Bytes
// the type []byte. reversed order.
BytesDescending LessThanFunc = func(lhs, rhs interface{}) bool {
return bytes.Compare(lhs.([]byte), rhs.([]byte)) < 0
}
BytesDesc LessThanFunc = BytesDescending
)