vibespatial.constructive.convex_hull¶
GPU-accelerated convex hull computation for all geometry types.
Uses Andrew’s monotone chain algorithm to compute the convex hull of each geometry. Output is always Polygon family: each row produces a closed polygon whose exterior ring is the convex hull of the input geometry’s coordinates.
- Degenerate cases:
Single point -> degenerate polygon (point repeated 4 times to form a closed ring).
Collinear / <3 unique points -> degenerate polygon from the convex hull of those points (line segment repeated to close, or single point).
- ADR-0033: Tier 1 NVRTC for monotone chain (geometry-specific inner loop),
Tier 3a CCCL segmented_sort for per-geometry x-sort, Tier 3a CCCL exclusive_sum for output offset computation.
- ADR-0002: COARSE class – hull vertices are exact coordinate subsets,
no new coordinates created. Stays fp64 on all devices since no compute-heavy accumulation occurs.
Attributes¶
Functions¶
|
Compute the convex hull of each geometry. |
Module Contents¶
- vibespatial.constructive.convex_hull.cp = None¶
- vibespatial.constructive.convex_hull.logger¶
- vibespatial.constructive.convex_hull.convex_hull_owned(owned: vibespatial.geometry.owned.OwnedGeometryArray, *, dispatch_mode: vibespatial.runtime.ExecutionMode | str = ExecutionMode.AUTO, precision: vibespatial.runtime.precision.PrecisionMode | str = PrecisionMode.AUTO) vibespatial.geometry.owned.OwnedGeometryArray¶
Compute the convex hull of each geometry.
Uses Andrew’s monotone chain algorithm. Output is always Polygon family: each row produces a closed polygon whose exterior ring is the convex hull of the input geometry’s coordinates.
Parameters¶
- ownedOwnedGeometryArray
Input geometries (any family).
- dispatch_modeExecutionMode or str
Execution mode selection. Defaults to AUTO.
- precisionPrecisionMode or str
Precision mode selection. Defaults to AUTO. COARSE class: hull vertices are exact coordinate subsets, stays fp64 on all devices.
Returns¶
- OwnedGeometryArray
Polygon OwnedGeometryArray with one convex hull per input row.