GSet ?



I'd like to see a GSet - that is, a growable set of integers, with
something like the following API.

GSet     *g_set_copy            (GSet *);

GSet	 *g_set_add		(GSet *, gint);
GSet	 *g_set_add_range       (GSet *, gint start, gint size);

GSet	 *g_set_remove		(GSet *, gint);
GSet	 *g_set_remove_range    (GSet *, gint start, gint size);  

GSet	 *g_set_xor             (GSet *, GSet *);
GSet	 *g_set_xor_range       (GSet *, gint start, gint size);

gboolean g_set_contains	        (GSet *, gint);

GSet    *g_set_union		(GSet *, GSet *);
GSet    *g_set_insersection	(GSet *, GSet *);

void     g_set_free             (GSet *);

gint     g_set_get_min          (GSet *);
gint     g_set_get_max          (GSet *);
gint     g_set_get_next         (GSet *, gint);
gint     g_set_get_prev         (GSet *, gint);  

(Is that sufficient?)

Would a patch to implement something like this be accepted for glib1.3?

-- 
Robert






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]