Public Member Functions | Private Member Functions | Private Attributes
vbl_bit_array_3d Class Reference

#include <vbl_bit_array_3d.h>

List of all members.

Public Member Functions

 vbl_bit_array_3d (unsigned int sizex, unsigned int sizey, unsigned int sizez)
 Create a bitarray of the specified size, without initialising elements.
 vbl_bit_array_3d (unsigned int sizex, unsigned int sizey, unsigned int sizez, bool v)
 Create a bitarray of the specified size, with initialisation of elements.
 vbl_bit_array_3d (unsigned int sizex, unsigned int sizey, unsigned int sizez, bool v[])
 Create a bitarray of the specified size, with initialisation of elements.
 vbl_bit_array_3d (vbl_bit_array_3d const &)
 Copy constructor.
 ~vbl_bit_array_3d ()
vbl_bit_array_3doperator= (vbl_bit_array_3d const &)
 Assignment operator.
bool operator== (vbl_bit_array_3d const &a) const
 Comparison.
bool operator!= (vbl_bit_array_3d const &a) const
void fill (bool v)
 Set all cell values to v.
void resize (unsigned int m, unsigned int n, unsigned int p)
 Delete contents and resize to m rows x n cols x p layers.
void clear ()
 make as if default-constructed.
void put (unsigned int i1, unsigned int i2, unsigned int i3, bool v)
 Set the value of a cell.
void set (unsigned int i1, unsigned int i2, unsigned int i3, bool v=true)
 Set the value of a cell; default is to set the value on.
bool get (unsigned int i1, unsigned int i2, unsigned int i3) const
 Return the value of a cell.
void flip (unsigned int i1, unsigned int i2, unsigned int i3)
 Change the value of a cell.
bool operator() (unsigned int i1, unsigned int i2, unsigned int i3) const
 Return the value of a cell.
unsigned int row1_count () const
unsigned int row2_count () const
unsigned int row3_count () const
unsigned long size () const
 Number of bytes allocated by the data.

Private Member Functions

void destruct ()
void construct (unsigned int m, unsigned int n, unsigned int p)
void index (unsigned int x, unsigned int y, unsigned int z, unsigned long &byteindex, unsigned char &bitindex) const

Private Attributes

unsigned int row1_count_
unsigned int row2_count_
unsigned int row3_count_
unsigned char * data_

Detailed Description

Definition at line 23 of file vbl_bit_array_3d.h.


Constructor & Destructor Documentation

vbl_bit_array_3d::vbl_bit_array_3d ( unsigned int  sizex,
unsigned int  sizey,
unsigned int  sizez 
) [inline]

Create a bitarray of the specified size, without initialising elements.

Definition at line 29 of file vbl_bit_array_3d.h.

vbl_bit_array_3d::vbl_bit_array_3d ( unsigned int  sizex,
unsigned int  sizey,
unsigned int  sizez,
bool  v 
) [inline]

Create a bitarray of the specified size, with initialisation of elements.

Definition at line 33 of file vbl_bit_array_3d.h.

vbl_bit_array_3d::vbl_bit_array_3d ( unsigned int  sizex,
unsigned int  sizey,
unsigned int  sizez,
bool  v[] 
)

Create a bitarray of the specified size, with initialisation of elements.

Definition at line 111 of file vbl_bit_array_3d.cxx.

vbl_bit_array_3d::vbl_bit_array_3d ( vbl_bit_array_3d const &  that)

Copy constructor.

Definition at line 101 of file vbl_bit_array_3d.cxx.

vbl_bit_array_3d::~vbl_bit_array_3d ( ) [inline]

Definition at line 40 of file vbl_bit_array_3d.h.


Member Function Documentation

void vbl_bit_array_3d::clear ( ) [inline]

make as if default-constructed.

Definition at line 59 of file vbl_bit_array_3d.h.

void vbl_bit_array_3d::construct ( unsigned int  m,
unsigned int  n,
unsigned int  p 
) [private]

Definition at line 91 of file vbl_bit_array_3d.cxx.

void vbl_bit_array_3d::destruct ( ) [inline, private]

Definition at line 93 of file vbl_bit_array_3d.h.

void vbl_bit_array_3d::fill ( bool  v)

Set all cell values to v.

Definition at line 45 of file vbl_bit_array_3d.cxx.

void vbl_bit_array_3d::flip ( unsigned int  i1,
unsigned int  i2,
unsigned int  i3 
)

Change the value of a cell.

Definition at line 32 of file vbl_bit_array_3d.cxx.

bool vbl_bit_array_3d::get ( unsigned int  i1,
unsigned int  i2,
unsigned int  i3 
) const

Return the value of a cell.

void vbl_bit_array_3d::index ( unsigned int  x,
unsigned int  y,
unsigned int  z,
unsigned long &  byteindex,
unsigned char &  bitindex 
) const [private]

Definition at line 62 of file vbl_bit_array_3d.cxx.

bool vbl_bit_array_3d::operator!= ( vbl_bit_array_3d const &  a) const [inline]

Definition at line 48 of file vbl_bit_array_3d.h.

bool vbl_bit_array_3d::operator() ( unsigned int  i1,
unsigned int  i2,
unsigned int  i3 
) const

Return the value of a cell.

Definition at line 51 of file vbl_bit_array_3d.cxx.

vbl_bit_array_3d & vbl_bit_array_3d::operator= ( vbl_bit_array_3d const &  that)

Assignment operator.

Definition at line 121 of file vbl_bit_array_3d.cxx.

bool vbl_bit_array_3d::operator== ( vbl_bit_array_3d const &  a) const

Comparison.

Definition at line 132 of file vbl_bit_array_3d.cxx.

void vbl_bit_array_3d::put ( unsigned int  i1,
unsigned int  i2,
unsigned int  i3,
bool  v 
)

Set the value of a cell.

Definition at line 19 of file vbl_bit_array_3d.cxx.

void vbl_bit_array_3d::resize ( unsigned int  m,
unsigned int  n,
unsigned int  p 
) [inline]

Delete contents and resize to m rows x n cols x p layers.

Definition at line 56 of file vbl_bit_array_3d.h.

unsigned int vbl_bit_array_3d::row1_count ( ) const [inline]

Definition at line 77 of file vbl_bit_array_3d.h.

unsigned int vbl_bit_array_3d::row2_count ( ) const [inline]

Definition at line 78 of file vbl_bit_array_3d.h.

unsigned int vbl_bit_array_3d::row3_count ( ) const [inline]

Definition at line 79 of file vbl_bit_array_3d.h.

void vbl_bit_array_3d::set ( unsigned int  i1,
unsigned int  i2,
unsigned int  i3,
bool  v = true 
) [inline]

Set the value of a cell; default is to set the value on.

Definition at line 65 of file vbl_bit_array_3d.h.

unsigned long vbl_bit_array_3d::size ( ) const

Number of bytes allocated by the data.

Definition at line 141 of file vbl_bit_array_3d.cxx.


Member Data Documentation

unsigned char* vbl_bit_array_3d::data_ [private]

Definition at line 89 of file vbl_bit_array_3d.h.

unsigned int vbl_bit_array_3d::row1_count_ [private]

Definition at line 86 of file vbl_bit_array_3d.h.

unsigned int vbl_bit_array_3d::row2_count_ [private]

Definition at line 87 of file vbl_bit_array_3d.h.

unsigned int vbl_bit_array_3d::row3_count_ [private]

Definition at line 88 of file vbl_bit_array_3d.h.


The documentation for this class was generated from the following files: