| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include <vector> | ||
| 4 | |||
| 5 | #include "task/include/task.hpp" | ||
| 6 | #include "urin_o_graham_passage/common/include/common.hpp" | ||
| 7 | |||
| 8 | namespace urin_o_graham_passage { | ||
| 9 | |||
| 10 | ✗ | class UrinOGrahamPassageOMP : public BaseTask { | |
| 11 | public: | ||
| 12 | static constexpr ppc::task::TypeOfTask GetStaticTypeOfTask() { | ||
| 13 | return ppc::task::TypeOfTask::kOMP; | ||
| 14 | } | ||
| 15 | |||
| 16 | explicit UrinOGrahamPassageOMP(const InType &in); | ||
| 17 | |||
| 18 | [[nodiscard]] static Point FindLowestPoint(const InType &points); | ||
| 19 | [[nodiscard]] static double PolarAngle(const Point &base, const Point &p); | ||
| 20 | [[nodiscard]] static int Orientation(const Point &p, const Point &q, const Point &r); | ||
| 21 | [[nodiscard]] static double DistanceSquared(const Point &p1, const Point &p2); | ||
| 22 | |||
| 23 | protected: | ||
| 24 | bool ValidationImpl() override; | ||
| 25 | bool PreProcessingImpl() override; | ||
| 26 | bool RunImpl() override; | ||
| 27 | bool PostProcessingImpl() override; | ||
| 28 | |||
| 29 | private: | ||
| 30 | [[nodiscard]] static std::vector<Point> PrepareOtherPoints(const InType &points, const Point &p0); | ||
| 31 | [[nodiscard]] static bool AreAllCollinear(const Point &p0, const std::vector<Point> &points); | ||
| 32 | [[nodiscard]] static std::vector<Point> BuildConvexHull(const Point &p0, const std::vector<Point> &points); | ||
| 33 | |||
| 34 | [[nodiscard]] static Point FindLowestPointParallel(const InType &points); | ||
| 35 | [[nodiscard]] static std::vector<Point> PrepareOtherPointsParallel(const InType &points, const Point &p0); | ||
| 36 | }; | ||
| 37 | |||
| 38 | } // namespace urin_o_graham_passage | ||
| 39 |