ARB
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PS_BitSet Class Reference

#include <ps_bitset.hxx>

Inheritance diagram for PS_BitSet:
Inheritance graph
[legend]
Collaboration diagram for PS_BitSet:
Collaboration graph
[legend]

Public Types

typedef set< longIndexSet
 

Public Member Functions

long getTrueIndices (IndexSet &_index_set, const long _fill_index)
 
long getFalseIndices (IndexSet &_index_set, const long _fill_index)
 
long getCountOfTrues (const long _fill_index=-1)
 
long getMaxUsedIndex () const
 
long getCapacity () const
 
virtual bool Get (const long _index)
 
virtual bool Set (const long _index, const bool _value)
 
virtual void setTrue (const long _index)
 
virtual void setFalse (const long _index)
 
void invert ()
 
void x_or (const PS_BitSet *_other_set)
 
void print (FILE *out, const bool _header, const long _fill_index)
 
bool save (PS_FileBuffer *_file)
 
bool load (PS_FileBuffer *_file, const long _fill_index)
 
bool copy (const PS_BitSet *_other_bitset)
 
virtual bool reserve (const long _capacity)
 
 PS_BitSet (const bool _bias, const long _capacity)
 
 PS_BitSet (PS_FileBuffer *_file, const long _fill_index=-1)
 
virtual ~PS_BitSet ()
 

Protected Member Functions

 PS_BitSet (const bool _bias, const long _max_index, const long _capacity)
 

Protected Attributes

unsigned chardata
 
bool bias
 
long max_index
 
long capacity
 

Detailed Description

Definition at line 11 of file ps_bitset.hxx.

Member Typedef Documentation

typedef set<long> PS_BitSet::IndexSet

Definition at line 27 of file ps_bitset.hxx.

Constructor & Destructor Documentation

PS_BitSet::PS_BitSet ( const bool  _bias,
const long  _max_index,
const long  _capacity 
)
inlineprotected

Definition at line 19 of file ps_bitset.hxx.

PS_BitSet::PS_BitSet ( const bool  _bias,
const long  _capacity 
)
inlineexplicit

Definition at line 52 of file ps_bitset.hxx.

References NULp, and reserve().

PS_BitSet::PS_BitSet ( PS_FileBuffer _file,
const long  _fill_index = -1 
)
inlineexplicit

Definition at line 57 of file ps_bitset.hxx.

References load(), and NULp.

virtual PS_BitSet::~PS_BitSet ( )
inlinevirtual

Definition at line 62 of file ps_bitset.hxx.

Member Function Documentation

long PS_BitSet::getTrueIndices ( PS_BitSet::IndexSet _index_set,
const long  _fill_index = -1 
)

Definition at line 123 of file ps_bitset.hxx.

References bias, data, max_index, and ps_assert.

Referenced by PS_BitMap::getTrueIndicesFor(), and PS_BitMap::printGNUplot().

long PS_BitSet::getFalseIndices ( PS_BitSet::IndexSet _index_set,
const long  _fill_index = -1 
)

Definition at line 99 of file ps_bitset.hxx.

References bias, data, max_index, and ps_assert.

Referenced by PS_BitMap::getFalseIndicesFor().

long PS_BitSet::getCountOfTrues ( const long  _fill_index = -1)

Definition at line 147 of file ps_bitset.hxx.

References bias, data, max_index, and ps_assert.

Referenced by PS_BitMap::getCountOfTrues().

long PS_BitSet::getMaxUsedIndex ( ) const
inline

Definition at line 33 of file ps_bitset.hxx.

References max_index.

long PS_BitSet::getCapacity ( ) const
inline

Definition at line 34 of file ps_bitset.hxx.

References capacity.

Referenced by PS_BitMap::copy().

bool PS_BitSet::Get ( const long  _index)
virtual

Reimplemented in FINAL_TYPE< SEQTYPE >.

Definition at line 200 of file ps_bitset.hxx.

References data, ps_assert, and reserve().

Referenced by PS_BitMap::get(), and print().

bool PS_BitSet::Set ( const long  _index,
const bool  _value 
)
virtual

Reimplemented in FINAL_TYPE< SEQTYPE >.

Definition at line 169 of file ps_bitset.hxx.

References data, max_index, ps_assert, and reserve().

Referenced by PS_BitMap::set().

void PS_BitSet::setTrue ( const long  _index)
virtual

Reimplemented in FINAL_TYPE< SEQTYPE >.

Definition at line 184 of file ps_bitset.hxx.

References data, max_index, ps_assert, and reserve().

void PS_BitSet::setFalse ( const long  _index)
virtual

Reimplemented in FINAL_TYPE< SEQTYPE >.

Definition at line 192 of file ps_bitset.hxx.

References data, max_index, ps_assert, and reserve().

void PS_BitSet::invert ( )

Definition at line 235 of file ps_bitset.hxx.

References capacity, and data.

Referenced by PS_BitMap::invert().

void PS_BitSet::x_or ( const PS_BitSet _other_set)

Definition at line 242 of file ps_bitset.hxx.

References capacity, and data.

Referenced by PS_BitMap::x_or().

void PS_BitSet::print ( FILE *  out,
const bool  _header = true,
const long  _fill_index = -1 
)

Definition at line 249 of file ps_bitset.hxx.

References bias, capacity, fputc(), Get(), and max_index.

Referenced by PS_BitMap::print().

bool PS_BitSet::save ( PS_FileBuffer _file)
bool PS_BitSet::load ( PS_FileBuffer _file,
const long  _fill_index = -1 
)
bool PS_BitSet::copy ( const PS_BitSet _other_bitset)

Definition at line 207 of file ps_bitset.hxx.

References bias, capacity, data, max_index, and reserve().

bool PS_BitSet::reserve ( const long  _capacity)
virtual

Reimplemented in FINAL_TYPE< SEQTYPE >, FINAL_TYPE< SEQTYPE >, and FINAL_TYPE< SEQTYPE >.

Definition at line 216 of file ps_bitset.hxx.

References bias, capacity, and data.

Referenced by copy(), Get(), load(), PS_BitSet(), Set(), setFalse(), and setTrue().

Member Data Documentation

unsigned char* PS_BitSet::data
protected
bool PS_BitSet::bias
protected
long PS_BitSet::max_index
protected
long PS_BitSet::capacity
protected

Definition at line 17 of file ps_bitset.hxx.

Referenced by copy(), getCapacity(), invert(), load(), print(), reserve(), and x_or().


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