Conjecture::PixelLine Class Reference

#include <PixelLine.h>

Inheritance diagram for Conjecture::PixelLine:

Conjecture::Root List of all members.

Detailed Description

A class for describing a line of up to 32 pixels.

****************************************************************

This class is used within OptIm to provide efficient feature extraction.


Public Member Functions

 PixelLine (u4 pixels)
u1 holes () const
u4 pixels () const
u1 black () const
bool get (unsigned i) const
void set (unsigned i)
void clear (unsigned i)
std::string str (char on= '#', char off= '.', u1 size=31) const
std::string str (u1 size) const
void assign (const PixelLine &other, u1 rightdel=0)

Static Public Member Functions

static void test (int argc=0, const char *argv[]=NULL)

Static Public Attributes

static const u1 MaxPixels = 31

Protected Member Functions

const bool & updated () const
void updatedIs (const bool &updated)
void blackIs (const u1 &black)
void holesIs (const u1 &holes)
void pixelsIs (const u4 &pixels)
void rawset (unsigned i)
void rawclear (unsigned i)
void rawline (u4 pixels)


Member Function Documentation

void Conjecture::PixelLine::assign const PixelLine other,
u1  rightdel = 0
 

Assign this PixelLine from another.

Cannot use operator= because we want to support pixel shifting via 'rightdel'.

Parameters:
rightdel Number of bits to shift the 'pixels' data to the right during the copy.

void Conjecture::PixelLine::clear unsigned  i  ) 
 

Sets pixel i to 0.

Pixels start indexing from 0. The 'index' is NOT verified to be within either soft or hard size limits. This method is NOT efficient, as it requires the updating of meta-information in addition to the pixel itself.

bool Conjecture::PixelLine::get unsigned  i  )  const [inline]
 

Return 0 if pixel position i is not set, 1 if it is set.

Pixels start indexing from 0 on the RIGHT! The 'index' is is NOT verified to be within either soft or hard size limits.

void Conjecture::PixelLine::set unsigned  i  ) 
 

Sets pixel i to 1.

Pixels start indexing from 0. The 'index' is NOT verified to be within either soft or hard size limits. This method is NOT efficient, as it requires the updating of meta-information in addition to the pixel itself.

string Conjecture::PixelLine::str char  on = '#',
char  off = '.',
u1  size = 31
const
 

Binary representation, as a string (inefficienct - debugging only).


The documentation for this class was generated from the following files:
Generated on Thu Jun 15 19:56:11 2006 for Conjecture by  doxygen 1.4.6