Public Member Functions | Private Member Functions | Private Attributes | List of all members
vbl_bit_array_3d Class Reference

#include <vbl_bit_array_3d.h>

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. More...
 
 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. More...
 
 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. More...
 
 vbl_bit_array_3d (vbl_bit_array_3d const &)
 Copy constructor. More...
 
 ~vbl_bit_array_3d ()
 
vbl_bit_array_3doperator= (vbl_bit_array_3d const &)
 Assignment operator. More...
 
bool operator== (vbl_bit_array_3d const &a) const
 Comparison. More...
 
bool operator!= (vbl_bit_array_3d const &a) const
 
void fill (bool v)
 Set all cell values to v. More...
 
void resize (unsigned int m, unsigned int n, unsigned int p)
 Delete contents and resize to m rows x n cols x p layers. More...
 
void clear ()
 make as if default-constructed. More...
 
void put (unsigned int i1, unsigned int i2, unsigned int i3, bool v)
 Set the value of a cell. More...
 
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. More...
 
bool get (unsigned int i1, unsigned int i2, unsigned int i3) const
 Return the value of a cell. More...
 
void flip (unsigned int i1, unsigned int i2, unsigned int i3)
 Change the value of a cell. More...
 
bool operator() (unsigned int i1, unsigned int i2, unsigned int i3) const
 Return the value of a cell. More...
 
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. More...
 

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() [1/4]

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() [2/4]

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() [3/4]

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() [4/4]

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::~vbl_bit_array_3d ( )
inline

Definition at line 40 of file vbl_bit_array_3d.h.

Member Function Documentation

◆ clear()

void vbl_bit_array_3d::clear ( )
inline

make as if default-constructed.

Definition at line 59 of file vbl_bit_array_3d.h.

◆ construct()

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.

◆ destruct()

void vbl_bit_array_3d::destruct ( )
inlineprivate

Definition at line 93 of file vbl_bit_array_3d.h.

◆ fill()

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.

◆ flip()

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.

◆ get()

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

Return the value of a cell.

◆ index()

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.

◆ operator!=()

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.

◆ operator()()

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.

◆ operator=()

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.

◆ operator==()

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.

◆ put()

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.

◆ resize()

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.

◆ row1_count()

unsigned int vbl_bit_array_3d::row1_count ( ) const
inline

Definition at line 77 of file vbl_bit_array_3d.h.

◆ row2_count()

unsigned int vbl_bit_array_3d::row2_count ( ) const
inline

Definition at line 78 of file vbl_bit_array_3d.h.

◆ row3_count()

unsigned int vbl_bit_array_3d::row3_count ( ) const
inline

Definition at line 79 of file vbl_bit_array_3d.h.

◆ set()

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.

◆ size()

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

◆ data_

unsigned char* vbl_bit_array_3d::data_
private

Definition at line 89 of file vbl_bit_array_3d.h.

◆ row1_count_

unsigned int vbl_bit_array_3d::row1_count_
private

Definition at line 86 of file vbl_bit_array_3d.h.

◆ row2_count_

unsigned int vbl_bit_array_3d::row2_count_
private

Definition at line 87 of file vbl_bit_array_3d.h.

◆ row3_count_

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: