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
//! Luby restart schedule.
//!
//! The Luby sequence `1,1,2,1,1,2,4,1,1,2,1,1,2,4,8,…` is log-optimal for
//! restarting a Las-Vegas algorithm whose runtime distribution is unknown
//! (Luby, Sinclair & Zuckerman 1993) — the canonical CSP/SAT cure for
//! heavy-tailed search. The i-th run is given a conflict budget of
//! `luby(i) · unit`; on exhaustion the search unwinds to the root and
//! re-descends, *retaining* the CHS weights, phase memory, and restart
//! nogoods accumulated so far (otherwise a restart merely repeats itself).
//!
//! Values are produced by Knuth's "reluctant doubling" recurrence — O(1) per
//! step, no table, no recursion.
/// Default per-restart base unit, in conflicts. The k-th run runs for
/// `luby(k) · UNIT` conflicts before cutting off.
pub const DEFAULT_UNIT: u64 = 100;
/// Streaming generator for the Luby unit sequence.