Main Page | Modules | Class List | File List | Class Members | File Members

bit_array.h File Reference

#include <stdio.h>
#include <gandalf/common/misc_defs.h>
#include <gandalf/common/allocate.h>
#include <gandalf/common/memory_stack.h>

Go to the source code of this file.

Classes

struct  Gan_BitArray
 1-dimensional array of bits More...

Defines

#define GAN_BITWORD_SIZE   32
#define GAN_BITWORD_FULL   (gan_uint32) GAN_UINT32_MAX
#define GAN_MSB_SET   (gan_uint32) (1<<31)
#define GAN_LSB_SET   (gan_uint32) 1

Typedefs

typedef gan_uint32 Gan_BitWord
 32-bit word
typedef Gan_BitArray Gan_BitArray
 1-dimensional array of bits

Enumerations

enum  Gan_Alignment { GAN_WORD_ALIGNMENT, GAN_BYTE_ALIGNMENT, GAN_BIT_ALIGNMENT }
 Alignment options when computing bounds of a bit array.

Functions

unsigned GAN_NO_BITWORDS (unsigned no_bits)
 Macro: Number of bit-words given number of bits.
Gan_BitArraygan_bit_array_form (Gan_BitArray *ba, unsigned int no_bits)
 Macro: Form bit array.
Gan_BitArraygan_bit_array_alloc (unsigned int no_bits)
 Macro: Allocate new bit array.
Gan_BitArraygan_bit_array_ms_malloc (unsigned int no_bits)
 Macro: Allocate new bit array using stack-style memory allocation.
Gan_Bool gan_bit_array_print (const Gan_BitArray *bit_array, int indent)
 Macro: Print bit array in ASCII to standard output.
Gan_Bool gan_bit_array_set_bit (Gan_BitArray *bit_array, int pos)
 Macro: Set bit in bit list to 1 (true).
Gan_Bool gan_bit_array_get_bit (const Gan_BitArray *bit_array, int pos)
 Macro: get bit of bit array.
Gan_Bool gan_bit_array_clear_bit (Gan_BitArray *bit_array, int pos)
 Macro: clear bit in bit list to 0 (false).
Gan_Bool gan_bit_array_twiddle_bit (Gan_BitArray *bit_array, int pos, Gan_Bool val)
 Macro: set/clear bit depending on Boolean argument.
Gan_Bool gan_bit_array_invert_bit (Gan_BitArray *bit_array, int pos)
 Macro: Invert bit.
Gan_Boolgan_bit_array_dilate_i (Gan_BitArray *ba, unsigned int no_pixels)
 Macro: Dilate bit array.


Detailed Description

Module: Binary array module

Part of: Gandalf Library

Version:
1.31
Date:
2005/08/22 08:52:18
Author:
jps
Copyright: (c) 2000 Imagineer Software Limited
Generated on Fri Mar 17 12:44:51 2006 by  doxygen 1.3.9.1