| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #include "chetverikova_e_sum_matrix_elem/seq/include/ops_seq.hpp" | ||
| 2 | |||
| 3 | #include <cstddef> | ||
| 4 | |||
| 5 | #include "chetverikova_e_sum_matrix_elem/common/include/common.hpp" | ||
| 6 | |||
| 7 | namespace chetverikova_e_sum_matrix_elem { | ||
| 8 | |||
| 9 | ✗ | ChetverikovaESumMatrixElemSEQ::ChetverikovaESumMatrixElemSEQ(const InType &in) { | |
| 10 | SetTypeOfTask(GetStaticTypeOfTask()); | ||
| 11 | GetInput() = in; | ||
| 12 | ✗ | GetOutput() = 0.0; | |
| 13 | ✗ | } | |
| 14 | |||
| 15 | ✗ | bool ChetverikovaESumMatrixElemSEQ::ValidationImpl() { | |
| 16 | ✗ | return ((std::get<0>(GetInput()) > 0) && (std::get<1>(GetInput()) > 0) && | |
| 17 | ✗ | (static_cast<size_t>(std::get<0>(GetInput())) * static_cast<size_t>(std::get<1>(GetInput())) == | |
| 18 | ✗ | std::get<2>(GetInput()).size()) && | |
| 19 | ✗ | (!(std::get<2>(GetInput()).empty())) && (GetOutput() == 0.0)); | |
| 20 | } | ||
| 21 | |||
| 22 | ✗ | bool ChetverikovaESumMatrixElemSEQ::PreProcessingImpl() { | |
| 23 | ✗ | GetOutput() = 0.0; | |
| 24 | ✗ | return (GetOutput() == 0.0); | |
| 25 | } | ||
| 26 | |||
| 27 | ✗ | bool ChetverikovaESumMatrixElemSEQ::RunImpl() { | |
| 28 | OutType &res = GetOutput(); | ||
| 29 | const auto &matrix = std::get<2>(GetInput()); | ||
| 30 | |||
| 31 | ✗ | for (double value : matrix) { | |
| 32 | ✗ | res += value; | |
| 33 | } | ||
| 34 | ✗ | return true; | |
| 35 | } | ||
| 36 | |||
| 37 | ✗ | bool ChetverikovaESumMatrixElemSEQ::PostProcessingImpl() { | |
| 38 | ✗ | return true; | |
| 39 | } | ||
| 40 | |||
| 41 | } // namespace chetverikova_e_sum_matrix_elem | ||
| 42 |