pub enum Mode {
Compile,
Mc,
Wmc,
Pmc,
Pwmc,
}Expand description
What a run answers: one of the four counting tasks, or a compile.
The instance header declares it: a c t mc|wmc|pmc|pwmc line names the
count, and a c p show line makes it projected. A mode given explicitly —
the binary’s --mode, or the mode argument of crate::count — must
agree with that header, and without either the run is a
Compile. The two are merged once, when the instance is
read; every dispatch reads the result and nothing re-derives it.
It prints as the token the header, --mode and the stats record spell it
with: compile, mc, wmc, pmc or pwmc.
Variants§
Compile
Compile the formula into a diagram over every original variable, and count its models.
Mc
Count the models: exact, an integer.
Wmc
Weigh the models by the c p weight table: in a bounded-precision log
domain.
Pmc
Count the assignments to the c p show variables that extend to a
model: exact, an integer.
Pwmc
Weigh those assignments by the c p weight table: exact, a rational.
Trait Implementations§
Source§impl FromStr for Mode
The mode a token names, spelled as it prints, so a caller that takes the
mode as text (the C and Python bindings) reads it with the binary’s
vocabulary.
impl FromStr for Mode
The mode a token names, spelled as it prints, so a caller that takes the mode as text (the C and Python bindings) reads it with the binary’s vocabulary.
use tididi_cnf::Mode;
assert_eq!("pwmc".parse::<Mode>()?, Mode::Pwmc);
assert!("weighted".parse::<Mode>().is_err());