43 std::size_t current_column,
44 std::size_t previous_row,
45 std::size_t previous_column,
56 previous_row, previous_column, alignment_type};
58 catch(
const std::exception &stderr)
60 int max_column_size = 0;
67 "Scenario::saveOrigin failed for current_row %1 (size %2) current_column %3 (size %4)")
71 .arg(max_column_size));
86 m_origin_matrix = std::vector<std::vector<ScenarioCell>>(
90std::pair<std::vector<pappso::specpeptidoms::ScenarioCell>,
int>
93 std::pair<std::vector<ScenarioCell>,
int> best_alignment;
98 best_alignment.first.push_back(current_cell);
101 best_alignment.first.push_back(current_cell);
102 best_alignment.second = m_best_alignment.second;
103 return best_alignment;
109 return m_best_alignment.second;
122 m_origin_matrix.clear();
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.
std::pair< ScenarioCell, int > m_best_alignment
std::vector< std::vector< ScenarioCell > > m_origin_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.
std::size_t previous_column