-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathset.go
229 lines (176 loc) · 6.48 KB
/
set.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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
// Copyright (C) 2017 ScyllaDB
// Use of this source code is governed by a ALv2-style
// license that can be found in the LICENSE file.
package set
import (
"github.com/scylladb/go-set/b16set"
"github.com/scylladb/go-set/b32set"
"github.com/scylladb/go-set/b64set"
"github.com/scylladb/go-set/b8set"
"github.com/scylladb/go-set/f32set"
"github.com/scylladb/go-set/f64set"
"github.com/scylladb/go-set/i16set"
"github.com/scylladb/go-set/i32set"
"github.com/scylladb/go-set/i64set"
"github.com/scylladb/go-set/i8set"
"github.com/scylladb/go-set/iset"
"github.com/scylladb/go-set/strset"
"github.com/scylladb/go-set/u16set"
"github.com/scylladb/go-set/u32set"
"github.com/scylladb/go-set/u64set"
"github.com/scylladb/go-set/u8set"
"github.com/scylladb/go-set/uset"
)
//go:generate ./gen_set.sh [8]byte b8set
// NewByte8Set is a convenience function to create a new b8set.Set
func NewByte8Set(ts ...[8]byte) *b8set.Set {
return b8set.New(ts...)
}
// NewByte8SetWithSize is a convenience function to create a new b8set.Set.
func NewByte8SetWithSize(size int) *b8set.Set {
return b8set.NewWithSize(size)
}
//go:generate ./gen_set.sh [16]byte b16set
// NewByte16Set is a convenience function to create a new b16set.Set
func NewByte16Set(ts ...[16]byte) *b16set.Set {
return b16set.New(ts...)
}
// NewByte16SetWithSize is a convenience function to create a new b16set.Set.
func NewByte16SetWithSize(size int) *b16set.Set {
return b16set.NewWithSize(size)
}
//go:generate ./gen_set.sh [32]byte b32set
// NewByte32Set is a convenience function to create a new b32set.Set
func NewByte32Set(ts ...[32]byte) *b32set.Set {
return b32set.New(ts...)
}
// NewByte32SetWithSize is a convenience function to create a new b32set.Set.
func NewByte32SetWithSize(size int) *b32set.Set {
return b32set.NewWithSize(size)
}
//go:generate ./gen_set.sh [64]byte b64set
// NewByte64Set is a convenience function to create a new b64set.Set
func NewByte64Set(ts ...[64]byte) *b64set.Set {
return b64set.New(ts...)
}
// NewByte64SetWithSize is a convenience function to create a new b64set.Set.
func NewByte64SetWithSize(size int) *b64set.Set {
return b64set.NewWithSize(size)
}
//go:generate ./gen_set.sh float32 f32set
// NewFloat32Set is a convenience function to create a new f32set.Set
func NewFloat32Set(ts ...float32) *f32set.Set {
return f32set.New(ts...)
}
// NewFloat32SetWithSize is a convenience function to create a new f32set.Set.
func NewFloat32SetWithSize(size int) *f32set.Set {
return f32set.NewWithSize(size)
}
//go:generate ./gen_set.sh float64 f64set
// NewFloat64Set is a convenience function to create a new f64set.Set
func NewFloat64Set(ts ...float64) *f64set.Set {
return f64set.New(ts...)
}
// NewFloat64SetWithSize is a convenience function to create a new f64set.Set.
func NewFloat64SetWithSize(size int) *f64set.Set {
return f64set.NewWithSize(size)
}
//go:generate ./gen_set.sh int iset
// NewIntSet is a convenience function to create a new iset.Set
func NewIntSet(ts ...int) *iset.Set {
return iset.New(ts...)
}
// NewIntSetWithSize is a convenience function to create a new iset.Set.
func NewIntSetWithSize(size int) *iset.Set {
return iset.NewWithSize(size)
}
//go:generate ./gen_set.sh int8 i8set
// NewInt8Set is a convenience function to create a new i8set.Set
func NewInt8Set(ts ...int8) *i8set.Set {
return i8set.New(ts...)
}
// NewInt8SetWithSize is a convenience function to create a new i8set.Set.
func NewInt8SetWithSize(size int) *i8set.Set {
return i8set.NewWithSize(size)
}
//go:generate ./gen_set.sh int16 i16set
// NewInt16Set is a convenience function to create a new i16set.Set
func NewInt16Set(ts ...int16) *i16set.Set {
return i16set.New(ts...)
}
// NewInt16SetWithSize is a convenience function to create a new i16set.Set.
func NewInt16SetWithSize(size int) *i16set.Set {
return i16set.NewWithSize(size)
}
//go:generate ./gen_set.sh int32 i32set
// NewInt32Set is a convenience function to create a new i32set.Set
func NewInt32Set(ts ...int32) *i32set.Set {
return i32set.New(ts...)
}
// NewInt32SetWithSize is a convenience function to create a new i32set.Set.
func NewInt32SetWithSize(size int) *i32set.Set {
return i32set.NewWithSize(size)
}
//go:generate ./gen_set.sh int64 i64set
// NewInt64Set is a convenience function to create a new i64set.Set
func NewInt64Set(ts ...int64) *i64set.Set {
return i64set.New(ts...)
}
// NewInt64SetWithSize is a convenience function to create a new i64set.Set.
func NewInt64SetWithSize(size int) *i64set.Set {
return i64set.NewWithSize(size)
}
//go:generate ./gen_set.sh uint uset
// NewUintSet is a convenience function to create a new uset.Set
func NewUintSet(ts ...uint) *uset.Set {
return uset.New(ts...)
}
// NewUintSetWithSize is a convenience function to create a new uset.Set.
func NewUintSetWithSize(size int) *uset.Set {
return uset.NewWithSize(size)
}
//go:generate ./gen_set.sh uint8 u8set
// NewUint8Set is a convenience function to create a new u8set.Set
func NewUint8Set(ts ...uint8) *u8set.Set {
return u8set.New(ts...)
}
// NewUint8SetWithSize is a convenience function to create a new u8set.Set.
func NewUint8SetWithSize(size int) *u8set.Set {
return u8set.NewWithSize(size)
}
//go:generate ./gen_set.sh uint16 u16set
// NewUint16Set is a convenience function to create a new u16set.Set
func NewUint16Set(ts ...uint16) *u16set.Set {
return u16set.New(ts...)
}
// NewUint16SetWithSize is a convenience function to create a new u16set.Set.
func NewUint16SetWithSize(size int) *u16set.Set {
return u16set.NewWithSize(size)
}
//go:generate ./gen_set.sh uint32 u32set
// NewUint32Set is a convenience function to create a new u32set.Set
func NewUint32Set(ts ...uint32) *u32set.Set {
return u32set.New(ts...)
}
// NewUint32SetWithSize is a convenience function to create a new u32set.Set.
func NewUint32SetWithSize(size int) *u32set.Set {
return u32set.NewWithSize(size)
}
//go:generate ./gen_set.sh uint64 u64set
// NewUint64Set is a convenience function to create a new u64set.Set
func NewUint64Set(ts ...uint64) *u64set.Set {
return u64set.New(ts...)
}
// NewUint64SetWithSize is a convenience function to create a new u64set.Set.
func NewUint64SetWithSize(size int) *u64set.Set {
return u64set.NewWithSize(size)
}
//go:generate ./gen_set.sh string strset
// NewStringSet is a convenience function to create a new strset.Set
func NewStringSet(ts ...string) *strset.Set {
return strset.New(ts...)
}
// NewStringSetWithSize is a convenience function to create a new strset.Set.
func NewStringSetWithSize(size int) *strset.Set {
return strset.NewWithSize(size)
}