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

Exactly describes one assignment of boolean values to variables of a Bdd.

It can be used as a witness of Bdd non-emptiness, since one can evaluate every Bdd in some corresponding valuation and get a true/false result.

Tuple Fields

0: Vec<bool>

Implementations

Create a new valuation from a vector of variables.

Create a valuation with all variables set to false.

Create a valuation with all variables set to true.

Flip the value of a given Bdd variable.

Set the value of the given variable to false.

Set the value of the given variable to true.

Update value of the given variable.

Convert the valuation to its underlying vector.

Get a value of a specific BDD variable in this valuation.

Number of variables in this valuation (used mostly for consistency checks).

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

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

(internal) “Increment” this valuation if possible. Interpret the valuation as bit-vector and perform a standard increment. This can be used to iterate over all valuations.

You can provide a clause which restricts which variables of the valuation can change. That is, any variable that has a fixed value in clause is considered to be fixed. Note that the method also checks whether the fixed values are the same as in the clause (i.e. the valuation and clause are mutually compatible) and panics if inconsistencies are found.

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

Formats the value using the given formatter. Read more

Convert a BddValuation to a Bdd with, well, exactly that one valuation.

Performs the conversion.

Feeds this value into the given Hasher. Read more

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

Allow indexing of BddValuation using BddVariables.

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

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

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

Converts the given value to a String. 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.