Function rgeometry::algorithms::two_opt_moves
source · [−]pub fn two_opt_moves<T, R>(
pts: Vec<Point<T>>,
rng: &mut R
) -> Result<Polygon<T>, Error> where
T: PolygonScalar + Debug,
R: Rng + ?Sized,
Expand description
Generate a valid polygon by connecting a set of points in such a way that there are no self-intersections.
Time complexity
$O(n^4)$
Space complexity
$O(n^2)$