[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Type bitindex_t: accessing bits in bitstrings

To reference a particular bit in a bitstring, you have to use an index of type bitindex_t.

datatype: bitindex_t
For information, the private datatype is defined as follows:
 
typedef struct bitindex_t {
  int index;  /* the index of the referenced bit, starting from 0 */
  int word;   /* the index of the word containing the bit, starting from 0 */
  bitstring_t bit; /* the mask selecting the right bit */
} bitindex_t;

Function: bitindex_t bitindex_init (int col)
Return a bitindex referencing the colth bit of any bitstring.
Function: void bitindex_inc (bitindex_t* b)
Increments the bitindex b by one, i.e. after the call the bitindex references the next bit.
Function: void bitindex_dec (bitindex_t* b)
Decrements the bitindex b by one, i.e. after the call the bitindex references the next bit.
Function: int bitindex_size (int n)
Return the number of elements of type bitstring_t needed to represent N bits.



This document was generated on October, 27 2006 using texi2html