| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #include "remizov_k_max_in_matrix_string/seq/include/ops_seq.hpp" | ||
| 2 | |||
| 3 | #include <algorithm> | ||
| 4 | #include <limits> | ||
| 5 | #include <vector> | ||
| 6 | |||
| 7 | #include "remizov_k_max_in_matrix_string/common/include/common.hpp" | ||
| 8 | |||
| 9 | namespace remizov_k_max_in_matrix_string { | ||
| 10 | |||
| 11 |
1/2✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
|
48 | RemizovKMaxInMatrixStringSEQ::RemizovKMaxInMatrixStringSEQ(const InType &in) { |
| 12 | SetTypeOfTask(GetStaticTypeOfTask()); | ||
| 13 |
1/2✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
|
48 | InType tmp(in); |
| 14 | GetInput().swap(tmp); | ||
| 15 | 48 | } | |
| 16 | |||
| 17 | 48 | bool RemizovKMaxInMatrixStringSEQ::ValidationImpl() { | |
| 18 | 48 | return true; | |
| 19 | } | ||
| 20 | |||
| 21 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 48 times.
|
48 | bool RemizovKMaxInMatrixStringSEQ::PreProcessingImpl() { |
| 22 | GetOutput().clear(); | ||
| 23 | 48 | return true; | |
| 24 | } | ||
| 25 | |||
| 26 |
1/2✓ Branch 0 taken 48 times.
✗ Branch 1 not taken.
|
48 | bool RemizovKMaxInMatrixStringSEQ::RunImpl() { |
| 27 |
1/2✓ Branch 0 taken 48 times.
✗ Branch 1 not taken.
|
48 | if (GetInput().empty()) { |
| 28 | return true; | ||
| 29 | } | ||
| 30 | |||
| 31 | 48 | std::vector<int> result; | |
| 32 |
2/2✓ Branch 0 taken 88 times.
✓ Branch 1 taken 48 times.
|
136 | for (const auto &row : GetInput()) { |
| 33 |
1/2✓ Branch 0 taken 88 times.
✗ Branch 1 not taken.
|
88 | if (!row.empty()) { |
| 34 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 88 times.
|
88 | int max_val = *std::ranges::max_element(row); |
| 35 | result.push_back(max_val); | ||
| 36 | } else { | ||
| 37 | ✗ | result.push_back(std::numeric_limits<int>::min()); | |
| 38 | } | ||
| 39 | } | ||
| 40 | |||
| 41 |
1/2✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
|
48 | GetOutput() = result; |
| 42 | return true; | ||
| 43 | } | ||
| 44 | |||
| 45 | 48 | bool RemizovKMaxInMatrixStringSEQ::PostProcessingImpl() { | |
| 46 | 48 | return true; | |
| 47 | } | ||
| 48 | |||
| 49 | } // namespace remizov_k_max_in_matrix_string | ||
| 50 |