| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #include "tsarkov_k_hypercube/seq/include/ops_seq.hpp" | ||
| 2 | |||
| 3 | #include "tsarkov_k_hypercube/common/include/common.hpp" | ||
| 4 | |||
| 5 | namespace tsarkov_k_hypercube { | ||
| 6 | namespace { | ||
| 7 | |||
| 8 | [[nodiscard]] bool HasValidInputShape(const InType &input_data) { | ||
| 9 | return input_data.size() == 3U; | ||
| 10 | } | ||
| 11 | |||
| 12 | } // namespace | ||
| 13 | |||
| 14 |
1/2✓ Branch 1 taken 56 times.
✗ Branch 2 not taken.
|
56 | TsarkovKHypercubeSEQ::TsarkovKHypercubeSEQ(const InType &in) { |
| 15 | SetTypeOfTask(GetStaticTypeOfTask()); | ||
| 16 |
1/2✓ Branch 1 taken 56 times.
✗ Branch 2 not taken.
|
56 | GetInput() = in; |
| 17 | 56 | GetOutput() = 0; | |
| 18 | 56 | } | |
| 19 | |||
| 20 |
1/2✓ Branch 0 taken 56 times.
✗ Branch 1 not taken.
|
56 | bool TsarkovKHypercubeSEQ::ValidationImpl() { |
| 21 | const InType &input_data = GetInput(); | ||
| 22 |
1/2✓ Branch 0 taken 56 times.
✗ Branch 1 not taken.
|
56 | if (!HasValidInputShape(input_data)) { |
| 23 | return false; | ||
| 24 | } | ||
| 25 | 56 | return input_data[2] >= 0; | |
| 26 | } | ||
| 27 | |||
| 28 | 56 | bool TsarkovKHypercubeSEQ::PreProcessingImpl() { | |
| 29 | 56 | GetOutput() = 0; | |
| 30 | 56 | return true; | |
| 31 | } | ||
| 32 | |||
| 33 | 56 | bool TsarkovKHypercubeSEQ::RunImpl() { | |
| 34 | const InType &input_data = GetInput(); | ||
| 35 | 56 | GetOutput() = input_data[2]; | |
| 36 | 56 | return true; | |
| 37 | } | ||
| 38 | |||
| 39 | 56 | bool TsarkovKHypercubeSEQ::PostProcessingImpl() { | |
| 40 | 56 | return true; | |
| 41 | } | ||
| 42 | |||
| 43 | } // namespace tsarkov_k_hypercube | ||
| 44 |