Skip to main content

Module prepare

Module prepare 

Source
Expand description

Solver-independent model views.

Structs§

LoweringContext
One solve’s immutable model metadata and lazy expression decompositions.
PreparedExpressions
A shareable arena snapshot and bounded, reuse-admitted extraction caches. Each cache has 16 independent shards, each retaining at most 16 expressions and 1,024 coefficient entries, evicting in insertion order. Before cache initialization, first encounters return owned terms without locking or allocating cache storage. Only repeated roots are admitted. A small direct-mapped history recognizes reuse across interleaved roots, and collisions may delay admission. Once initialized, cached entries are always checked independently of admission history. Larger decompositions are returned uncached.

Enums§

AffineTerms
Affine coefficients borrowed from the arena or shared with the preparation cache.
Extracted
A one-use decomposition, or a shared decomposition after observed reuse.
PolynomialTerms
A direct affine node or an owned/shared degree-at-most-two decomposition.

Functions§

row_sides
Optional single-sided view, in lower/upper order for a range. Free rows produce no sides. The caller owns native row ordering and provenance.
shifted_bounds
Bounds for a polynomial body with its constant removed. No row is dropped, split, relaxed or reclassified as feasible/infeasible by this operation.