Loading...
Searching...
No Matches
pappso::specpeptidoms::CorrectionTree Class Reference

`#include <correctiontree.h>`

## Public Member Functions

| CorrectionTree ()
| ~CorrectionTree ()
void | addPeaks (std::size_t peak1, std::size_t peak2)
std::vector< std::vector< std::size_t > > | getPeaks () const

## Private Member Functions

| CorrectionTree (std::size_t peak)

## Private Attributes

std::size_t | peak
CorrectionTreeSp | msp_left
CorrectionTreeSp | msp_right

## Detailed Description

Definition at line 44 of file correctiontree.h.

## Constructor & Destructor Documentation

## CorrectionTree() [1/2]

pappso::specpeptidoms::CorrectionTree::CorrectionTree | ( |  | ) |

Definition at line 36 of file correctiontree.cpp.

: peak(0)
{
}
pappso::specpeptidoms::CorrectionTree::peak
std::size_t peak
Definition correctiontree.h:55

References peak.

Referenced by addPeaks().

## ~CorrectionTree()

pappso::specpeptidoms::CorrectionTree::~CorrectionTree | ( |  | ) |

Definition at line 44 of file correctiontree.cpp.

{
}

## CorrectionTree() [2/2]

pappso::specpeptidoms::CorrectionTree::CorrectionTree | ( | std::size_t | peak | ) |

private

Definition at line 40 of file correctiontree.cpp.

: peak(peak)
{
}

References peak.

## Member Function Documentation

## addPeaks()

void pappso::specpeptidoms::CorrectionTree::addPeaks | ( | std::size_t | peak1,
|  | std::size_t | peak2 )

Definition at line 49 of file correctiontree.cpp.

{
if(msp_left != nullptr)
{
msp_left->addPeaks(peak1, peak2);
msp_right->addPeaks(peak1, peak2);
}
else
{
msp_left = std::make_shared<CorrectionTree>(CorrectionTree(peak1));
msp_right = std::make_shared<CorrectionTree>(CorrectionTree(peak2));
}
}
pappso::specpeptidoms::CorrectionTree::msp_left
CorrectionTreeSp msp_left
Definition correctiontree.h:56
pappso::specpeptidoms::CorrectionTree::CorrectionTree
CorrectionTree()
Definition correctiontree.cpp:36
pappso::specpeptidoms::CorrectionTree::msp_right
CorrectionTreeSp msp_right
Definition correctiontree.h:56

References CorrectionTree(), msp_left, and msp_right.

Referenced by pappso::specpeptidoms::SemiGlobalAlignment::correctAlign(), and pappso::specpeptidoms::SemiGlobalAlignment::preciseAlign().

## getPeaks()

std::vector< std::vector< std::size_t > > pappso::specpeptidoms::CorrectionTree::getPeaks | ( |  | ) | const

Definition at line 64 of file correctiontree.cpp.

{
std::vector<std::vector<std::size_t>> v_left, v_right;
if(peak == 0 && msp_left != nullptr)
{
v_left = msp_left->getPeaks();
v_right = msp_right->getPeaks();
v_left.insert(v_left.end(), v_right.begin(), v_right.end());
}
else if(peak > 0 && msp_left != nullptr)
{
v_left = msp_left->getPeaks();
v_right = msp_right->getPeaks();
v_left.insert(v_left.end(), v_right.begin(), v_right.end());
for(auto vec = v_left.begin(); vec != v_left.end(); vec++)
{
vec->push_back(peak);
}
}
else if(peak > 0)
{
v_left.push_back({peak});
}
return v_left;
}

References msp_left, msp_right, and peak.

Referenced by pappso::specpeptidoms::SemiGlobalAlignment::correctAlign(), and pappso::specpeptidoms::SemiGlobalAlignment::preciseAlign().

## Member Data Documentation

## msp_left

CorrectionTreeSp pappso::specpeptidoms::CorrectionTree::msp_left

private

Definition at line 56 of file correctiontree.h.

Referenced by addPeaks(), and getPeaks().

## msp_right

CorrectionTreeSp pappso::specpeptidoms::CorrectionTree::msp_right

private

Definition at line 56 of file correctiontree.h.

Referenced by addPeaks(), and getPeaks().

## peak

std::size_t pappso::specpeptidoms::CorrectionTree::peak

private

Definition at line 55 of file correctiontree.h.

Referenced by CorrectionTree(), CorrectionTree(), and getPeaks().

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

- pappsomspp/core/processing/specpeptidoms/correctiontree.h
- pappsomspp/core/processing/specpeptidoms/correctiontree.cpp