Statistics
| Branch: | Revision:

streamers / nodeid_set.h @ 3c2cbe48

History | View | Annotate | Download (926 Bytes)

1
/*
2
 *  Copyright (c) 2010 Csaba Kiraly
3
 *  Copyright (c) 2010 Luca Abeni
4
 *
5
 *  This is free software; see gpl-3.0.txt
6
 */
7

    
8
#ifndef NODEID_SET_H
9
#define NODEID_SET_H
10

    
11
#include <stdbool.h>
12

    
13
struct nodeID;
14

    
15
void nidset_shuffle(const struct nodeID **base, int nmemb);
16

    
17
int nidset_filter(const struct nodeID **dst, int *dst_size, const struct nodeID **src, int src_size, bool(*f)(const struct nodeID *));
18

    
19
// B \ A
20
int nidset_complement(const struct nodeID **dst, int *dst_size, const struct nodeID **bs, int bs_size, const struct nodeID **as, int as_size);
21

    
22
bool nidset_find(int *i, const struct nodeID **ids, int ids_size, const struct nodeID *id);
23

    
24
int nidset_add(const struct nodeID **dst, int *dst_size, const struct nodeID **as, int as_size, const struct nodeID **bs, int bs_size);
25

    
26
int nidset_add_i(const struct nodeID **dst, int *dst_size, int max_size, const struct nodeID **as, int as_size);
27

    
28
#endif        /* NODEID_SET_H */
29