pub struct BddPartialValuation(pub(crate) Vec<Option<bool>>);
Expand description

Describes assignment of some arbitrary number of Bdd variables.

A partial valuation can be used to quickly construct simple conjunctive/disjunctive clauses. It also exactly describes one path in a Bdd and hence can be used as an intermediate value when traversing the valuations of a Bdd.

Tuple Fields

0: Vec<Option<bool>>

Implementations

Creates an empty valuation without any variables set.

True if the valuation contains no values.

Return the number of fixed variables in this valuation.

Return the identifier of the last fixed variable in this valuation. Returns None if no variable is fixed.

Create a partial valuation from a list of variables and values.

The order of variables in the slice can be arbitrary. The operation does not perform any uniqueness checking. If the slice contains multiple copies of the same variable, the last value is accepted.

Consume this valuation and turn it into a vector of values which are stored in it.

Get a value stored for the given variable id, if any.

Returns true if this valuation has the value of id variable set.

Update value of the given id variable.

Remove value of a variable from this valuation.

If the value was not set, this operation has no effect.

Returns true if the values set in this partial valuation match the values fixed in the other given valuation. I.e. the two valuations agree on fixed values in valuation.

In other words this >= valuation in terms of specificity.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

If possible, convert the given partial valuation to valuation with the same number of variables. Partial valuation must contain values of all variables.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.