Trait flussab_cnf::Dimacs
source · pub trait Dimacs: Copy + Eq {
const MAX_DIMACS: isize;
// Required methods
fn from_dimacs(value: isize) -> Self;
fn dimacs(self) -> isize;
}
Expand description
Type that can be used to represent literals and variables in DIMACS CNF and related file formats.
Required Associated Constants§
sourceconst MAX_DIMACS: isize
const MAX_DIMACS: isize
Largest literal / variable supported.
Required Methods§
sourcefn from_dimacs(value: isize) -> Self
fn from_dimacs(value: isize) -> Self
Returns a literal / variable that is encoded as the passed integer in the DIMACS CNF format.
If the value is out of range, e.g. negative for a variable, this may panic or return an arbitrary value.
Object Safety§
This trait is not object safe.