Conjecture::BitInfo Class Reference

#include <BitInfo.h>

Inheritance diagram for Conjecture::BitInfo:

Conjecture::BitOverlay Conjecture::Root List of all members.

Detailed Description

Pre-computed bit-level information about an 32-bit word.

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

This is an extension of BitOverlay that precomputes all relevant information and caches it in fields. The constructor performs a single pass over the bit-sequence to establish all of the information of interest and stores that info in fields.

In deciding when to use BitOverlay and when to use BitInfo, almost any time more than one method from BitInfo is needed on a particular bit sequence, using BitInfo is probably more efficient.

The only downside is that we have serious code redundancy - the individual methods in BitOverlay perform individual tasks, while the constructor in BitInfo performs those some tasks in one monolithic loop (calling individual methods in the constructor would defeat the entire purpose of having BitInfo - it is supposed to be faster than calling individual methods).


Public Member Functions

 BitInfo (BitOverlay::Layout layout)
const BitOverlay::BitCountlargestRegion () const
const unsigned short * regions () const
const BitOverlay::BitCountregionCount () const
const BitOverlay::BitPosfirstLow () const
const BitOverlay::BitPosfirstHigh () const
std::ostream & print (std::ostream &os=std::cout, const std::string &indent="") const

Static Public Member Functions

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

Protected Member Functions

void largestRegionIs (const BitOverlay::BitCount &largestRegion)
void regionCountIs (const BitOverlay::BitCount &regionCount)
void firstLowIs (const BitOverlay::BitPos &firstLow)
void firstHighIs (const BitOverlay::BitPos &firstHigh)


Member Function Documentation

void Conjecture::BitInfo::Test int  argc = 0,
const char *  argv[] = NULL
[static]
 

The Unit-testing method

Reimplemented from Conjecture::BitOverlay.


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