[][src]Struct biodivine_lib_bdd::BddValuation

pub struct BddValuation(Vec<bool>);

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.

Implementations

impl BddValuation[src]

pub fn new(values: Vec<bool>) -> BddValuation[src]

Create a new valuation from a vector of variables.

pub fn all_false(num_vars: u16) -> BddValuation[src]

Create a valuation with all variables set to false.

pub fn all_true(num_vars: u16) -> BddValuation[src]

Create a valuation with all variables set to true.

pub fn flip_value(&mut self, variable: BddVariable)[src]

Flip the value of a given Bdd variable.

pub fn clear(&mut self, variable: BddVariable)[src]

pub fn set(&mut self, variable: BddVariable)[src]

pub fn vector(self) -> Vec<bool>[src]

Convert the valuation to its underlying vector.

pub fn value(&self, variable: BddVariable) -> bool[src]

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

pub fn num_vars(&self) -> u16[src]

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

pub(crate) fn next(&self) -> Option<BddValuation>[src]

(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.

Trait Implementations

impl Clone for BddValuation[src]

impl Debug for BddValuation[src]

impl Display for BddValuation[src]

impl Eq for BddValuation[src]

impl From<BddValuation> for Bdd[src]

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

impl Hash for BddValuation[src]

impl Index<BddVariable> for BddValuation[src]

Allow indexing of BddValuation using BddVariables.

type Output = bool

The returned type after indexing.

impl Ord for BddValuation[src]

impl PartialEq<BddValuation> for BddValuation[src]

impl PartialOrd<BddValuation> for BddValuation[src]

impl StructuralEq for BddValuation[src]

impl StructuralPartialEq for BddValuation[src]

Auto Trait Implementations

impl RefUnwindSafe for BddValuation

impl Send for BddValuation

impl Sync for BddValuation

impl Unpin for BddValuation

impl UnwindSafe for BddValuation

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.