Skip to main content

Module spatio_temporal

Module spatio_temporal 

Source

Structs§

SpatialRegion
Spatial region representation for RCC8 reasoning

Enums§

Rcc8Relation
RCC8 spatial relations for topological reasoning
TemporalOp
Allen’s Interval Algebra operations for temporal reasoning

Constants§

MAX_BOUNDARY_POINTS
Max vertices per region on the zero-heap RCC-8 path.

Functions§

aabb_overlap
Do two AABBs overlap? (the BVH/R-tree broad-phase intersection test)
causally_connectable
Are two events causally connectable — within or on each other’s light cone (timelike or lightlike, s² ≤ 0)? The relativity-adjusted “could one have influenced the other?” that bounds temporal logic in 4-D space-time. Spacelike-separated events have no frame-invariant ordering.
evaluate_rcc8
Evaluate RCC8 spatial relation between two regions
evaluate_rcc8_points
Zero-heap, full-polygon RCC-8 over two boundary-vertex slices (+ region ids). Correctly distinguishes tangential (TPP/TPPi) from non-tangential (NTPP/NTPPi) proper parts via a point-on-boundary test — unlike evaluate_rcc8, which conflated them. Allocation-free.
evaluate_temporal
Evaluate temporal relation using Allen’s Interval Algebra
heat_equation_step
One explicit finite-difference (FTCS) step of the heat/diffusion PDE ∂u/∂t = α·∂²u/∂x² over a 1-D grid: u_new[i] = u[i] + r·(u[i−1] − 2u[i] + u[i+1]), r = α·dt/dx². Dirichlet boundaries (endpoints fixed). Writes into out. Numerically stable for r ≤ 0.5. Zero-heap.
minkowski_interval
The Minkowski interval s² = −c²·Δt² + Δx² + Δy² + Δz² (signature −+++) between two events. s² < 0 timelike, = 0 lightlike (on the light cone), > 0 spacelike.
pack_point
Pack a 2-D vertex into a u64 object field: signed fixed-point x in the high 32 bits, y in the low 32 bits. Handles negative coordinates (lat/long).
polygon_aabb
The AABB of a polygon’s boundary vertices.
quin_to_region
Extract spatial region from NQuin.
region_to_quin
Convert spatial region to NQuin for storage in graph.
spatial_index_query
Spatial-index broad-phase (BVH / R-tree): from the AABBs of many regions, return the indices whose box overlaps query — pruning the candidates a precise RCC-8 test must then check. Makes spatial queries scale to massive global entity maps. Zero-heap (caller out).
unpack_point
Inverse of pack_point.

Type Aliases§

Aabb
An axis-aligned bounding box (min_x, min_y, max_x, max_y) — a BVH/R-tree node volume.