Equations
- Hex.GraphIso.Nauty.Sparse.Target.best keys score empty = if keys.isEmpty = true then empty else (List.foldl (Hex.GraphIso.Nauty.Sparse.Target.select score) (keys.headD 0, 0) keys).fst
Instances For
theorem
Hex.GraphIso.Nauty.Sparse.bestcellCached_spec
{n : Nat}
(G : SparseGraph n)
(lab ptn : Array Nat)
(level : Nat)
(s : Scratch)
(l : Label n)
(hl : Label.ofArray? n lab = some l)
(hptn : ptn.size = n)
(hend : ptn[n - 1]! ≤ level)
(hidx : Index.Valid n lab ptn level s.cellstart s.cellend)
(hsize : s.hits.size = n)
:
(bestcellCached (Graph.ofGraph G) lab s).fst = Target.best (Target.nontrivial (cells ptn level n))
(Target.score (Graph.ofGraph G) lab s (Target.nontrivial (cells ptn level n))) n
Cached target selection attains the first maximum partial-join score. The reused hit array may initially contain arbitrary values.