# This file is automatically generated by pyo3_stub_gen
# ruff: noqa: E501, F401, F403, F405
r"""
Path ordering algorithms.

Provides pure-geometry combinatorial optimizations for sequencing
paths (polylines, arcs) with no machining or CNC concepts.
"""

import collections.abc
__all__ = [
    "order_nearest_neighbor",
]

def order_nearest_neighbor(paths: collections.abc.Sequence[collections.abc.Sequence[tuple[float, float]]]) -> list[int]:
    r"""
    Order paths by greedy nearest-neighbor starting from the longest path.
    
    Starts with the longest input path (most vertices), then repeatedly
    selects the next unvisited path whose first endpoint is closest to
    the current path's last endpoint.
    
    :param paths: List of paths, each a list of (x, y) points.
    :returns: Indices into *paths* in visit order.
    """

