pub struct IndexStats<O: Eq + Hash> {
pub op_card: HashMap<O, usize>,
pub fanouts: FanOuts<O>,
pub atom_card: HashMap<usize, usize>,
}Fields§
§op_card: HashMap<O, usize>Per-op driver-scan cardinality (|by_op[op]|). The base estimate for an
atom when no per-atom override is present — correct for naive matching,
where every atom of an op reads the same full bucket.
fanouts: FanOuts<O>Measured mean fan-out of each access path, from the round’s index build.
The default is all-unmeasured, which prices every bound key at the fixed
halving this model replaces; see path_selectivity.
atom_card: HashMap<usize, usize>Per-atom (atom_id) driver-scan cardinality, overriding op_card for
that atom. Needed for semi-naive: an atom’s base cardinality is set by
its mode (delta / full / full∖delta), which is per-atom, not per-op —
two atoms with the same op can have different modes in one flavor (e.g.
(f (f x y) z) variant 1: atom 0 is full∖delta, atom 1 is delta, both
op f). op_card cannot represent that; atom_card can.