Expand description
Fleet math library — C-compatible math primitives for fleet operations.
Provides Eisenstein integer operations, Laman rigidity checks, holonomy
verification, Manhattan distance for vector search, and Pythagorean-48
directional encoding. All public functions are #[no_mangle] extern "C".
Structs§
- Snap
Result - Result of snapping a point to the nearest Eisenstein integer.
Constants§
- PYTHAGOREAN_
48_ DIRECTIONS - Number of discrete directions in Pythagorean-48 encoding.
Functions§
- batch_
snap - Batch snap for interleaved (x, y) pairs.
- fleet_
eisenstein_ norm - Eisenstein integer norm: N(a + bω) = a² − ab + b²
- fleet_
holonomy_ check - Check if the product of integer transforms equals the identity (1).
- fleet_
is_ rigid - Check whether a graph with
verticesandedgessatisfies the Laman rigidity condition E ≥ 2V − 3. - fleet_
laman_ edges - Minimum edges for a Laman-rigid graph on
verticesvertices: 2V − 3. - fleet_
manhattan_ distance - Compute the Manhattan (L1) distance between two integer vectors.
- fleet_
pythagorean48_ encode - Quantize a 2D angle (from x, y components) into one of 48 discrete directions.
- snap
- Snap a single (x, y) point to the nearest Eisenstein integer.