| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include <cstdint> | ||
| 4 | #include <string> | ||
| 5 | #include <tuple> | ||
| 6 | #include <vector> | ||
| 7 | |||
| 8 | #include "task/include/task.hpp" | ||
| 9 | |||
| 10 | namespace pylaeva_s_convex_hull_bin { | ||
| 11 | |||
| 12 | struct Point { | ||
| 13 | int x, y; | ||
| 14 | 5248 | explicit Point(int x = 0, int y = 0) : x(x), y(y) {} | |
| 15 | bool operator==(const Point &other) const { | ||
| 16 |
5/8✓ Branch 0 taken 233 times.
✓ Branch 1 taken 1995 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 233 times.
✓ Branch 4 taken 2 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✓ Branch 7 taken 2 times.
|
2230 | return x == other.x && y == other.y; |
| 17 | } | ||
| 18 | bool operator!=(const Point &other) const { | ||
| 19 | return !(*this == other); | ||
| 20 | } | ||
| 21 | bool operator<(const Point &other) const { | ||
| 22 | return std::tie(x, y) < std::tie(other.x, other.y); | ||
| 23 | } | ||
| 24 | }; | ||
| 25 | |||
| 26 |
1/2✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
|
20 | struct ImageData { |
| 27 | int width{0}; | ||
| 28 | int height{0}; | ||
| 29 | std::vector<uint8_t> pixels; | ||
| 30 | std::vector<std::vector<Point>> components; | ||
| 31 | std::vector<std::vector<Point>> convex_hulls; | ||
| 32 | }; | ||
| 33 | |||
| 34 | using InType = ImageData; | ||
| 35 | using OutType = ImageData; | ||
| 36 | using TestType = std::tuple<int, std::string>; | ||
| 37 | using BaseTask = ppc::task::Task<InType, OutType>; | ||
| 38 | |||
| 39 | } // namespace pylaeva_s_convex_hull_bin | ||
| 40 |