libpappsomspp
Library for mass spectrometry
|
#include <scenario.h>
Public Member Functions | |
Scenario () | |
~Scenario () | |
void | saveOrigin (std::size_t current_row, std::size_t current_column, std::size_t previous_row, std::size_t previous_column, int score, AlignType alignment_type) |
Stores the origin (cell location and alignment type) of the provided cell in the backtracking matrix. | |
void | reserve (std::size_t n_rows, std::size_t n_columns) |
Allocate new storage to the backtracking matrix if needed. | |
std::pair< std::vector< ScenarioCell >, int > | getBestAlignment () const |
Returns the scenario cells corresponding to the best alignment and the best alignment's score. | |
int | getBestScore () const |
void | resetScenario () |
Private Attributes | |
std::vector< std::vector< ScenarioCell > > | m_origin_matrix |
std::pair< ScenarioCell, int > | m_best_alignment = {{0, 0, AlignType::init}, -15} |
Definition at line 55 of file scenario.h.
pappso::specpeptidoms::Scenario::Scenario | ( | ) |
pappso::specpeptidoms::Scenario::~Scenario | ( | ) |
std::pair< std::vector< pappso::specpeptidoms::ScenarioCell >, int > pappso::specpeptidoms::Scenario::getBestAlignment | ( | ) | const |
Returns the scenario cells corresponding to the best alignment and the best alignment's score.
Definition at line 72 of file scenario.cpp.
References pappso::specpeptidoms::ScenarioCell::alignment_type, pappso::specpeptidoms::init, m_best_alignment, m_origin_matrix, pappso::specpeptidoms::ScenarioCell::previous_column, and pappso::specpeptidoms::ScenarioCell::previous_row.
int pappso::specpeptidoms::Scenario::getBestScore | ( | ) | const |
Definition at line 88 of file scenario.cpp.
References m_best_alignment.
void pappso::specpeptidoms::Scenario::reserve | ( | std::size_t | n_rows, |
std::size_t | n_columns ) |
Allocate new storage to the backtracking matrix if needed.
Definition at line 65 of file scenario.cpp.
References pappso::specpeptidoms::init, and m_origin_matrix.
void pappso::specpeptidoms::Scenario::resetScenario | ( | ) |
Definition at line 94 of file scenario.cpp.
References pappso::specpeptidoms::init, and m_best_alignment.
void pappso::specpeptidoms::Scenario::saveOrigin | ( | std::size_t | current_row, |
std::size_t | current_column, | ||
std::size_t | previous_row, | ||
std::size_t | previous_column, | ||
int | score, | ||
AlignType | alignment_type ) |
Stores the origin (cell location and alignment type) of the provided cell in the backtracking matrix.
Definition at line 41 of file scenario.cpp.
References m_best_alignment, and m_origin_matrix.
|
private |
Definition at line 96 of file scenario.h.
Referenced by getBestAlignment(), getBestScore(), resetScenario(), and saveOrigin().
|
private |
Definition at line 95 of file scenario.h.
Referenced by getBestAlignment(), reserve(), and saveOrigin().