Skip to main content

Module solver

Module solver 

Source
Expand description

Public solver API.

Mirrors the per-instance Solver shape of the FFI-based dds-bridge crate so that a pons migration from one to the other can be a near-mechanical swap.

The canonical entry points are the free functions solve_deal (one deal, its 5 strains fanned across rayon workers) and solve_deals (a batch, parallelised per (deal, strain)); both return a full 5 × 4 TrickCountTable per deal. Solver itself is the per-strain building block they reuse: one instance is bound to a single strain (reconfigurable via Solver::set_strain) and Solver::solves all 4 declarers of that strain for a deal — handy for deterministic profiling or driving the solve yourself.

Structs§

Solver
Per-strain solver.
TrickCountTable
Double-dummy result table: tricks each seat takes as declarer at each strain.

Functions§

solve_deal
Solve a single deal, spreading its 5 strains across rayon workers.
solve_deal_on
Solve a single deal sequentially on solver, returning the full 5 × 4 TrickCountTable.
solve_deals
Solve a batch of deals in parallel.
solve_deals_with_memory
Solve a batch of deals in parallel with an explicit per-thread transposition-table memory budget, in MiB.