Loading...
Searching...
No Matches
PackedSequenceData Class Reference
Inheritance diagram for PackedSequenceData:
[legend]
Collaboration diagram for PackedSequenceData:
[legend]

## Public Member Functions

void | reserve (size_t baseCount)
size_t | size ()
void | clear ()
uint8_t | operator[] (size_t index)
void | push_back (uint8_t base)
char | operator[] (PackedVectorIndex_t baseIndex)
void | set (PackedVectorIndex_t baseIndex, char value)
void | push_back (char value)
Public Member Functions inherited from PackedVector< accessorFunc, setterFunc, elementCount2BytesFunc >
uint32_t | operator[] (uint32_t i)
void | set (uint32_t i, uint32_t v)
size_t | getElementCount () const
double | getUtilization ()
void | reserve (uint32_t reserveElements)
size_t | size ()
void | resize (uint32_t newSize)
void | push_back (uint32_t value)

## Additional Inherited Members

Protected Attributes inherited from PackedVector< accessorFunc, setterFunc, elementCount2BytesFunc >
std::vector< uint8_t > | m_data
size_t | m_elementCount
double | m_growthRateMultiplier
double | m_growthRateAdder

## Detailed Description

Definition at line 381 of file GenomeSequence.cpp.

## Member Function Documentation

## clear()

void PackedSequenceData::clear | ( |  | ) |

inline

Definition at line 398 of file GenomeSequence.cpp.

{m_packedBases.clear(); m_baseCount = 0;}

## operator[]() [1/2]

char PackedSequenceData::operator[] | ( | PackedVectorIndex_t | baseIndex | ) |

inline

Definition at line 253 of file ReferenceSequence.h.

{
return BaseAsciiMap::int2base[ (static_cast<PackedVector4Bit_t>(*this))[baseIndex]];
}
BaseAsciiMap::int2base
static const char int2base[]
Convert from int representation to the base.
Definition BaseAsciiMap.h:38
PackedVector
Definition PackedVector.h:42

## operator[]() [2/2]

uint8_t PackedSequenceData::operator[] | ( | size_t | index | ) |

inline

Definition at line 399 of file GenomeSequence.cpp.

{
return (m_packedBases[index>>1] >> ((index&0x1)<<2)) & 0xf;
}

## push_back()

void PackedSequenceData::push_back | ( | char | value | ) |

inline

Definition at line 261 of file ReferenceSequence.h.

{
this->PackedVector4Bit_t::push_back(BaseAsciiMap::base2int[(uint32_t) value]);
}
BaseAsciiMap::base2int
static unsigned char base2int[256+1]
Map ASCII values to a 2 (or 3) bit encoding for the base pair value for just base space (ACTGNactgn).
Definition BaseAsciiMap.h:61

## reserve()

void PackedSequenceData::reserve | ( | size_t | baseCount | ) |

inline

Definition at line 396 of file GenomeSequence.cpp.

{m_packedBases.reserve(baseCount/2);}

## set()

void PackedSequenceData::set | ( | PackedVectorIndex_t | baseIndex,
|  | char | value
| ) |  |

inline

Definition at line 257 of file ReferenceSequence.h.

{
this->PackedVector4Bit_t::set(baseIndex, BaseAsciiMap::base2int[(uint32_t) value]);
}

## size()

size_t PackedSequenceData::size | ( |  | ) |

inline

Definition at line 397 of file GenomeSequence.cpp.

{return m_baseCount;}

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

- general/GenomeSequence.cpp
- general/ReferenceSequence.h