Skip to content

Commit 7d747d2

Browse files
committed
update
1 parent b1744c2 commit 7d747d2

File tree

2 files changed

+0
-52
lines changed

2 files changed

+0
-52
lines changed

source/cover.c

-7
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@
1515
#pragma mark - Public
1616

1717

18-
/*****************************************************************************
19-
* *
20-
* --------------------------------- cover -------------------------------- *
21-
* *
22-
*****************************************************************************/
23-
2418
int cover(Set *members, Set *subsets, Set *covering)
2519
{
2620
Set intersection;
@@ -31,7 +25,6 @@ int cover(Set *members, Set *subsets, Set *covering)
3125

3226
/// 初始化覆盖集合
3327
set_init(covering, subsets->match, NULL);
34-
3528

3629
/// 当还有成员未覆盖同时还有候选集合成员
3730
while (set_size(members) > 0 && set_size(subsets) > 0) {

source/set.c

-45
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@
1616

1717
#pragma mark - Public
1818

19-
/*****************************************************************************
20-
* *
21-
* ------------------------------- set_init ------------------------------- *
22-
* *
23-
*****************************************************************************/
2419

2520
void set_init(Set *set, int (*match)(const void *key1, const void *key2), void (*destroy)(void *data))
2621
{
@@ -31,11 +26,6 @@ void set_init(Set *set, int (*match)(const void *key1, const void *key2), void (
3126
return;
3227
}
3328

34-
/*****************************************************************************
35-
* *
36-
* ------------------------------ set_insert ------------------------------ *
37-
* *
38-
*****************************************************************************/
3929

4030
int set_insert(Set *set, const void *data)
4131
{
@@ -46,11 +36,6 @@ int set_insert(Set *set, const void *data)
4636
return list_ins_next(set, list_tail(set), data);
4737
}
4838

49-
/*****************************************************************************
50-
* *
51-
* ------------------------------ set_remove ------------------------------ *
52-
* *
53-
*****************************************************************************/
5439

5540
int set_remove(Set *set, void **data)
5641
{
@@ -73,11 +58,6 @@ int set_remove(Set *set, void **data)
7358
return list_rem_next(set, prev, data);
7459
}
7560

76-
/*****************************************************************************
77-
* *
78-
* ------------------------------- set_union ------------------------------ *
79-
* *
80-
*****************************************************************************/
8161

8262
int set_union(Set *setu, const Set *set1, const Set *set2)
8363
{
@@ -123,11 +103,6 @@ int set_union(Set *setu, const Set *set1, const Set *set2)
123103
return 0;
124104
}
125105

126-
/*****************************************************************************
127-
* *
128-
* --------------------------- set_intersection --------------------------- *
129-
* *
130-
*****************************************************************************/
131106

132107
int set_intersection(Set *seti, const Set *set1, const Set *set2)
133108
{
@@ -156,11 +131,6 @@ int set_intersection(Set *seti, const Set *set1, const Set *set2)
156131
return 0;
157132
}
158133

159-
/*****************************************************************************
160-
* *
161-
* ---------------------------- set_difference ---------------------------- *
162-
* *
163-
*****************************************************************************/
164134

165135
int set_difference(Set *setd, const Set *set1, const Set *set2)
166136
{
@@ -189,11 +159,6 @@ int set_difference(Set *setd, const Set *set1, const Set *set2)
189159
return 0;
190160
}
191161

192-
/*****************************************************************************
193-
* *
194-
* ----------------------------- set_is_member ---------------------------- *
195-
* *
196-
*****************************************************************************/
197162

198163
int set_is_member(const Set *set, const void *data)
199164
{
@@ -209,11 +174,6 @@ int set_is_member(const Set *set, const void *data)
209174
return 0;
210175
}
211176

212-
/*****************************************************************************
213-
* *
214-
* ----------------------------- set_is_subset ---------------------------- *
215-
* *
216-
*****************************************************************************/
217177

218178
int set_is_subset(const Set *set1, const Set *set2)
219179
{
@@ -232,11 +192,6 @@ int set_is_subset(const Set *set1, const Set *set2)
232192
return 1;
233193
}
234194

235-
/*****************************************************************************
236-
* *
237-
* ------------------------------ set_is_equal ---------------------------- *
238-
* *
239-
*****************************************************************************/
240195

241196
int set_is_equal(const Set *set1, const Set *set2)
242197
{

0 commit comments

Comments
 (0)