| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include <cmath> | ||
| 4 | #include <cstddef> | ||
| 5 | #include <cstdint> | ||
| 6 | #include <tuple> | ||
| 7 | #include <vector> | ||
| 8 | |||
| 9 | namespace gutyansky_a_matrix_column_sum { | ||
| 10 | |||
| 11 |
3/6✓ Branch 1 taken 70 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 63 times.
✗ Branch 4 not taken.
✗ Branch 6 not taken.
✓ Branch 7 taken 7 times.
|
350 | struct Matrix { |
| 12 | size_t rows; | ||
| 13 | size_t cols; | ||
| 14 | std::vector<int32_t> data; | ||
| 15 | |||
| 16 | [[nodiscard]] bool IsValid() const { | ||
| 17 |
5/6✓ Branch 0 taken 63 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 7 times.
✓ Branch 3 taken 56 times.
✓ Branch 4 taken 7 times.
✓ Branch 5 taken 56 times.
|
63 | return rows > 0 && cols > 0 && data.size() == rows * cols; |
| 18 | } | ||
| 19 | |||
| 20 | friend bool operator==(const Matrix &v_left, const Matrix &v_right) { | ||
| 21 | return std::tie(v_left.rows, v_left.cols, v_left.data) == std::tie(v_right.rows, v_right.cols, v_right.data); | ||
| 22 | } | ||
| 23 | }; | ||
| 24 | |||
| 25 | } // namespace gutyansky_a_matrix_column_sum | ||
| 26 |