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