1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//! Whole-formula shape statistics, and the `coloring_like` predicate over
//! them.
//!
//! A formula whose variable occurrences and clause widths are both
//! near-uniform is shaped like a graph-colouring encoding, which two
//! independent decisions read: Arjun's bounded-variable-addition policy under
//! `auto`, and the vtree portfolio's candidate gates. Both must agree on what
//! "coloring-like" means, so the two statistics and the thresholds over them
//! live here — a function of the clause set alone, beside the per-variable
//! views in [`occ`](super::occ).
use CnfFormula;
/// The clause-width half of the `coloring_like` predicate: the coefficient of
/// variation (stddev / mean) of clause widths. Degenerate inputs (fewer than 2
/// clauses, zero mean width) score `0.0`.
pub
/// The occurrence half of the `coloring_like` predicate: the coefficient of
/// variation (stddev / mean) of per-variable occurrence counts, over the
/// variables that actually occur. Degenerate inputs (fewer than 2 occurring
/// variables) score `0.0`.
pub
/// Occurrence-dispersion ceiling of the `coloring_like` predicate.
const COLORING_OCC_CV_MAX: f64 = 0.5;
/// Clause-width-dispersion ceiling of the `coloring_like` predicate.
pub const COLORING_WIDTH_CV_MAX: f64 = 0.30;
/// The `coloring_like` predicate over its two statistics — the one place its
/// thresholds live.
pub