Skip to main content

Crate superinstance_ffi

Crate superinstance_ffi 

Source

Functions§

si_cascade_match
Cascade matching: count matching bytes between query and a single codebook entry. Returns number of matching positions.
si_constraint_check
Count how many constraint bounds are violated. vals[i] must be <= bounds[i] for satisfaction. Returns count of violations.
si_deadband_filter
Deadband filter: if val is within band of center, return center. Otherwise return val (pass through).
si_eisenstein_norm
Eisenstein integer norm: a² - ab + b²
si_holonomy_check
Check holonomy: product of all transforms must equal 1 (identity) Each transform is a packed i64 representing a group element. For simplicity, we check if the cumulative XOR-based hash equals 0 or if the product of signed values equals 1.
si_is_rigid
Check if a graph with v vertices and e edges is rigid (Laman condition)
si_laman_edges
Laman graph edge count: 2v - 3
si_manhattan_distance
Manhattan distance between two integer vectors.
si_pythagorean48_encode
Quantize a 2D direction to one of 48 evenly-spaced angles (7.5° increments). Returns a u8 in [0, 47].
si_spline_interpolate
Linear interpolation along a polyline defined by control points. pts is a flat array of 2*n doubles (x0,y0, x1,y1, …). t is in [0, 1], mapping to the full arc length. For simplicity, this does uniform-parameter linear interpolation between segments.