OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
set.h
Go to the documentation of this file.
1 #if !defined(__SET__)
2 
3 #define __SET__
4 
5 /* SET.H */
6 
7 #include <stdio.h>
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 /* A set is represented as an array of characters with each character */
13 /* holding 8 bits of the set. */
14 typedef struct {
15  char *buf;
16  long int size;
18  FILE *fp;
19 } set_type;
20 
21 
22 /* Functions: */
23 
24 set_type set_init( long int n );
25 
26 int set_empty( set_type set );
27 
28 void set_insert( long int element,
29  set_type set );
30 
31 void set_delete( long int element,
32  set_type set );
33 
34 int set_member( long int element,
35  set_type set );
36 
37 long int set_min( set_type set );
38 
39 long int set_max( set_type set );
40 
41 long int num_in_set( set_type set );
42 
43 /* SET_ON and SET_OFF are only valid if the set is in memory */
44 #define SET_ON(set) memset(set.buf,255,(set.size>>3L)+1L)
45 #define SET_OFF(set) memset(set.buf,0,(set.size>>3L)+1L)
46 
47 /* set_on and set_off are valid for all sets */
48 void set_on( set_type set );
49 
50 void set_off( set_type set );
51 
52 int set_equal( set_type a,
53  set_type b );
54 
55 void set_assign( set_type *a,
56  set_type b );
57 
59  set_type b );
60 
62  set_type b );
63 
65  set_type b );
66 
67 void set_nuke( set_type *set );
68 
69 #ifdef __cplusplus
70 }
71 #endif
72 
73 #endif
long int set_min(set_type set)
FILE * fp
Definition: set.h:18
void set_assign(set_type *a, set_type b)
set_type set_difference(set_type a, set_type b)
char diskstorage
Definition: set.h:17
long int set_max(set_type set)
set_type set_union(set_type a, set_type b)
void set_insert(long int element, set_type set)
os2<< "> n<< " > nendobj n
void set_on(set_type set)
set_type set_init(long int n)
char * buf
Definition: set.h:15
Definition: set.h:14
int set_member(long int element, set_type set)
int set_empty(set_type set)
void set_off(set_type set)
long int num_in_set(set_type set)
void set_delete(long int element, set_type set)
int set_equal(set_type a, set_type b)
long int size
Definition: set.h:16
set_type set_intersection(set_type a, set_type b)
void set_nuke(set_type *set)