Expand description
Static filters: bounds computed once from a coordinate range.
The dynamic filter in each predicate computes a permanent – a sum of absolute products – on every call, which costs roughly as much as the determinant itself. When a caller can state an upper bound on coordinate magnitude up front (a model’s bounding box, a quantisation grid), the error bound can be precomputed and the per-call work drops to one comparison.
The trade is coverage, not correctness: a static bound is necessarily
looser than a per-input one, so it defers more often. Its bound covers
every rounding error of the f64 evaluation, so a sign it certifies is the
exact sign. It does not defer wherever the dynamic filter does: the dynamic
orient2d filter declines differences outside [1e-90, 1e90], which the
static one may still settle. A caller that exceeds the declared range gets
None rather than a silently invalid answer, and a declared range so small
that a bound would sit below the normal range, where products lose their
relative accuracy, is refused by StaticFilter::new (#429).
Structs§
- Static
Filter - Precomputed error bounds for a declared coordinate range.