vibespatial.geometry.equality

GPU-accelerated geometry equality operations.

geom_equals_exact: element-wise coordinate comparison with tolerance.

Tier 1 NVRTC kernel for per-pair coordinate comparison (ADR-0033). ADR-0002: PREDICATE class, dual fp32/fp64 via PrecisionPlan.

geom_equals_identical: strict byte-level coordinate equality (tolerance=0).

Delegates to geom_equals_exact with tolerance=0 — no separate kernel.

geom_equals: mutual topological coverage with explicit empty-set handling.

Uses native predicate expressions in both directions and combines them on device before the terminal boolean export.

Attributes

Functions

geom_equals_exact_owned(→ numpy.ndarray)

Element-wise geometry equality with tolerance.

geom_equals_identical_owned(→ numpy.ndarray)

Element-wise strict geometry identity (bitwise coordinate equality).

geom_equals_owned(→ numpy.ndarray)

Element-wise topological geometry equality.

Module Contents

vibespatial.geometry.equality.logger
vibespatial.geometry.equality.geom_equals_exact_owned(left: vibespatial.geometry.owned.OwnedGeometryArray, right: vibespatial.geometry.owned.OwnedGeometryArray, tolerance: float, *, dispatch_mode: vibespatial.runtime.ExecutionMode | str = ExecutionMode.AUTO) numpy.ndarray

Element-wise geometry equality with tolerance.

Returns a bool array of shape (row_count,). GPU path compares coordinate buffers directly (no Shapely round-trip). Falls back to Shapely for row count below threshold or when GPU is unavailable.

vibespatial.geometry.equality.geom_equals_identical_owned(left: vibespatial.geometry.owned.OwnedGeometryArray, right: vibespatial.geometry.owned.OwnedGeometryArray, *, dispatch_mode: vibespatial.runtime.ExecutionMode | str = ExecutionMode.AUTO) numpy.ndarray

Element-wise strict geometry identity (bitwise coordinate equality).

Equivalent to geom_equals_exact(..., tolerance=0) — delegates to the same NVRTC kernel infrastructure with zero tolerance.

Returns a bool array of shape (row_count,). Null geometries always compare as False (Shapely convention).

vibespatial.geometry.equality.geom_equals_owned(left: vibespatial.geometry.owned.OwnedGeometryArray, right: vibespatial.geometry.owned.OwnedGeometryArray, *, dispatch_mode: vibespatial.runtime.ExecutionMode | str = ExecutionMode.AUTO) numpy.ndarray

Element-wise topological geometry equality.

Equality is mutual coverage for non-empty geometries. Empty geometries of every supported family represent the same empty point set and therefore compare equal when both rows are valid and empty. The GPU path evaluates both coverage directions as native expressions, combines them with the empty-set rule on device, and performs one terminal boolean export.

Returns a bool array of shape (row_count,). Null geometries always compare as False (Shapely convention).