Input

Enum Input 

Source
pub enum Input {
    File(PathBuf),
    Formula(CnfFormula, CnfMeta),
}
Expand description

The instance a run reads: a DIMACS file, or a formula already parsed with its header.

Every form count takes converts into this, so a path (&str, String, &Path, PathBuf) or the pair parse_dimacs and formula_from_clauses return can be passed as it is.

Variants§

§

File(PathBuf)

A DIMACS file, read when the run starts. Its reading counts against the time limit, as it does in the binary.

A directory is read as the bundle vitri --out-dir writes. The run compiles the bundle’s reduced.cnf on its vtree.vtree, split into the components components.json lists, and preprocesses nothing; its mode is the one in preprocess.json, and a different mode is refused. The answer is the original formula’s: the record’s lift is applied to the count, and in mode compile the diagram is expanded back onto the original variables.

§

Formula(CnfFormula, CnfMeta)

A formula and the header lines that came with it: the c t mode, the c p show set and the c p weight table.

Trait Implementations§

Source§

impl Debug for Input

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<&Path> for Input

Source§

fn from(path: &Path) -> Self

Converts to this type from the input type.
Source§

impl From<&str> for Input

Source§

fn from(path: &str) -> Self

Converts to this type from the input type.
Source§

impl From<(CnfFormula, CnfMeta)> for Input

Source§

fn from((formula, meta): (CnfFormula, CnfMeta)) -> Self

Converts to this type from the input type.
Source§

impl From<PathBuf> for Input

Source§

fn from(path: PathBuf) -> Self

Converts to this type from the input type.
Source§

impl From<String> for Input

Source§

fn from(path: String) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Input

§

impl RefUnwindSafe for Input

§

impl Send for Input

§

impl Sync for Input

§

impl Unpin for Input

§

impl UnwindSafe for Input

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.