algo — C++23 日本語リファレンス GitHub

convex_hull

関数 · 二次元点集合の凸包を構築する

template <class T>
std::vector<Point<T>> convex_hull(std::vector<Point<T>> points);

概要

二次元点集合の凸包を構築する

monotone chainにより、凸包上の点を巡回順で返す。

テンプレートパラメータ

名前 説明
T 座標の型

パラメータ

名前 説明
points 点集合

戻り値

凸包上の点列

計算量