EWAHBoolArray 0.8.0
A compressed bitmap class in C++
Loading...
Searching...
No Matches
ewah::RunningLengthWord< uword > Class Template Reference

For expert users. More...

#include <runninglengthword.h>

Public Member Functions

 RunningLengthWord (uword &data)
 
 RunningLengthWord (const RunningLengthWord &rlw)
 
RunningLengthWordoperator= (const RunningLengthWord &rlw)
 
bool getRunningBit () const
 Which bit is being repeated?
 
uword getRunningLength () const
 how many words should be filled by the running bit
 
uword getNumberOfLiteralWords () const
 followed by how many literal words?
 
uword size () const
 Total of getRunningLength() and getNumberOfLiteralWords()
 
void setRunningBit (bool b)
 running length of which type of bits
 
void discardFirstWords (uword x)
 
void setRunningLength (uword l)
 
void setNumberOfLiteralWords (uword l)
 

Static Public Member Functions

static bool getRunningBit (uword data)
 how many words should be filled by the running bit
 
static uword getRunningLength (uword data)
 followed by how many literal words?
 
static uword size (uword data)
 Total of getRunningLength() and getNumberOfLiteralWords()
 
static uword getNumberOfLiteralWords (uword data)
 followed by how many literal words?
 
static void setRunningBit (uword &data, bool b)
 running length of which type of bits
 
static void setRunningLength (uword &data, uword l)
 
static void setNumberOfLiteralWords (uword &data, uword l)
 

Public Attributes

uword & mydata
 

Static Public Attributes

static const uint32_t runninglengthbits = sizeof(uword) * 4
 
static const uint32_t literalbits = sizeof(uword) * 8 - 1 - runninglengthbits
 
static const uword largestliteralcount
 
static const uword largestrunninglengthcount
 
static const uword shiftedlargestrunninglengthcount
 
static const uword notshiftedlargestrunninglengthcount
 
static const uword runninglengthplusrunningbit
 
static const uword notrunninglengthplusrunningbit
 
static const uword notlargestrunninglengthcount
 

Detailed Description

template<class uword>
class ewah::RunningLengthWord< uword >

For expert users.

This class is used to represent a special type of word storing a run length. It is defined by the Enhanced Word Aligned Hybrid (EWAH) format. You don't normally need to access this class.

Definition at line 15 of file runninglengthword.h.

Constructor & Destructor Documentation

◆ RunningLengthWord() [1/2]

template<class uword >
ewah::RunningLengthWord< uword >::RunningLengthWord ( uword & data)
inline

Definition at line 17 of file runninglengthword.h.

◆ RunningLengthWord() [2/2]

template<class uword >
ewah::RunningLengthWord< uword >::RunningLengthWord ( const RunningLengthWord< uword > & rlw)
inline

Definition at line 19 of file runninglengthword.h.

Member Function Documentation

◆ discardFirstWords()

template<class uword >
void ewah::RunningLengthWord< uword >::discardFirstWords ( uword x)
inline

Definition at line 91 of file runninglengthword.h.

◆ getNumberOfLiteralWords() [1/2]

template<class uword >
uword ewah::RunningLengthWord< uword >::getNumberOfLiteralWords ( ) const
inline

followed by how many literal words?

Definition at line 55 of file runninglengthword.h.

◆ getNumberOfLiteralWords() [2/2]

template<class uword >
static uword ewah::RunningLengthWord< uword >::getNumberOfLiteralWords ( uword data)
inlinestatic

followed by how many literal words?

Definition at line 77 of file runninglengthword.h.

◆ getRunningBit() [1/2]

template<class uword >
bool ewah::RunningLengthWord< uword >::getRunningBit ( ) const
inline

Which bit is being repeated?

Definition at line 29 of file runninglengthword.h.

◆ getRunningBit() [2/2]

template<class uword >
static bool ewah::RunningLengthWord< uword >::getRunningBit ( uword data)
inlinestatic

how many words should be filled by the running bit

Definition at line 34 of file runninglengthword.h.

◆ getRunningLength() [1/2]

template<class uword >
uword ewah::RunningLengthWord< uword >::getRunningLength ( ) const
inline

how many words should be filled by the running bit

Definition at line 41 of file runninglengthword.h.

◆ getRunningLength() [2/2]

template<class uword >
static uword ewah::RunningLengthWord< uword >::getRunningLength ( uword data)
inlinestatic

followed by how many literal words?

Definition at line 48 of file runninglengthword.h.

◆ operator=()

template<class uword >
RunningLengthWord & ewah::RunningLengthWord< uword >::operator= ( const RunningLengthWord< uword > & rlw)
inline

Definition at line 21 of file runninglengthword.h.

◆ setNumberOfLiteralWords() [1/2]

template<class uword >
static void ewah::RunningLengthWord< uword >::setNumberOfLiteralWords ( uword & data,
uword l )
inlinestatic

Definition at line 130 of file runninglengthword.h.

◆ setNumberOfLiteralWords() [2/2]

template<class uword >
void ewah::RunningLengthWord< uword >::setNumberOfLiteralWords ( uword l)
inline

Definition at line 124 of file runninglengthword.h.

◆ setRunningBit() [1/2]

template<class uword >
void ewah::RunningLengthWord< uword >::setRunningBit ( bool b)
inline

running length of which type of bits

Definition at line 84 of file runninglengthword.h.

◆ setRunningBit() [2/2]

template<class uword >
static void ewah::RunningLengthWord< uword >::setRunningBit ( uword & data,
bool b )
inlinestatic

running length of which type of bits

Definition at line 105 of file runninglengthword.h.

◆ setRunningLength() [1/2]

template<class uword >
static void ewah::RunningLengthWord< uword >::setRunningLength ( uword & data,
uword l )
inlinestatic

Definition at line 119 of file runninglengthword.h.

◆ setRunningLength() [2/2]

template<class uword >
void ewah::RunningLengthWord< uword >::setRunningLength ( uword l)
inline

Definition at line 112 of file runninglengthword.h.

◆ size() [1/2]

template<class uword >
uword ewah::RunningLengthWord< uword >::size ( ) const
inline

Total of getRunningLength() and getNumberOfLiteralWords()

Definition at line 62 of file runninglengthword.h.

◆ size() [2/2]

template<class uword >
static uword ewah::RunningLengthWord< uword >::size ( uword data)
inlinestatic

Total of getRunningLength() and getNumberOfLiteralWords()

Definition at line 69 of file runninglengthword.h.

Member Data Documentation

◆ largestliteralcount

template<class uword >
const uword ewah::RunningLengthWord< uword >::largestliteralcount
static
Initial value:
=
(static_cast<uword>(1) << literalbits) - 1

Definition at line 138 of file runninglengthword.h.

◆ largestrunninglengthcount

template<class uword >
const uword ewah::RunningLengthWord< uword >::largestrunninglengthcount
static
Initial value:
=
(static_cast<uword>(1) << runninglengthbits) - 1

Definition at line 140 of file runninglengthword.h.

◆ literalbits

template<class uword >
const uint32_t ewah::RunningLengthWord< uword >::literalbits = sizeof(uword) * 8 - 1 - runninglengthbits
static

Definition at line 137 of file runninglengthword.h.

◆ mydata

template<class uword >
uword& ewah::RunningLengthWord< uword >::mydata

Definition at line 153 of file runninglengthword.h.

◆ notlargestrunninglengthcount

template<class uword >
const uword ewah::RunningLengthWord< uword >::notlargestrunninglengthcount
static
Initial value:
=
static_cast<uword>(~largestrunninglengthcount)

Definition at line 150 of file runninglengthword.h.

◆ notrunninglengthplusrunningbit

template<class uword >
const uword ewah::RunningLengthWord< uword >::notrunninglengthplusrunningbit
static
Initial value:
=
static_cast<uword>(~runninglengthplusrunningbit)

Definition at line 148 of file runninglengthword.h.

◆ notshiftedlargestrunninglengthcount

template<class uword >
const uword ewah::RunningLengthWord< uword >::notshiftedlargestrunninglengthcount
static
Initial value:
=
static_cast<uword>(~shiftedlargestrunninglengthcount)

Definition at line 144 of file runninglengthword.h.

◆ runninglengthbits

template<class uword >
const uint32_t ewah::RunningLengthWord< uword >::runninglengthbits = sizeof(uword) * 4
static

Definition at line 136 of file runninglengthword.h.

◆ runninglengthplusrunningbit

template<class uword >
const uword ewah::RunningLengthWord< uword >::runninglengthplusrunningbit
static
Initial value:
=
(static_cast<uword>(1) << (runninglengthbits + 1)) - 1

Definition at line 146 of file runninglengthword.h.

◆ shiftedlargestrunninglengthcount

template<class uword >
const uword ewah::RunningLengthWord< uword >::shiftedlargestrunninglengthcount
static
Initial value:
=
largestrunninglengthcount << 1

Definition at line 142 of file runninglengthword.h.


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