1 #ifndef BITVECTOR_H 2 #define BITVECTOR_H 3 4 typedef struct _bit_vector 5 { 6 int nBits; 7 unsigned char* ptr; 8 int ptrLen; 9 int nElem; 10 } bit_vector_t; 11 12 bit_vector_t* bv_create(int len, int nbits); 13 void bv_set(const bit_vector_t* bm, int pos, int val); 14 void bv_set2(const bit_vector_t* bm, int pos, int val); 15 void bv_set4(const bit_vector_t* bm, int pos, int val); 16 int bv_get(const bit_vector_t* bm, int pos) __attribute__((pure)); 17 void bv_free(bit_vector_t* bm); 18 19 #endif 20