[−][src]Struct biodivine_lib_bdd::BddVariableSet
Maintains the set of variables that can appear in a Bdd
.
Used to create new Bdd
s for basic formulas.
Fields
num_vars: u16
var_names: Vec<String>
var_index_mapping: HashMap<String, u16>
Implementations
impl BddVariableSet
[src]
Methods for evaluating boolean expressions.
pub fn safe_eval_expression(
&self,
expression: &BooleanExpression
) -> Option<Bdd>
[src]
&self,
expression: &BooleanExpression
) -> Option<Bdd>
Evaluate the given BooleanExpression
in the context of this BddVariableSet
. Return None
if some
variables are unknown.
pub fn eval_expression(&self, expression: &BooleanExpression) -> Bdd
[src]
Evaluate the given BooleanExpression
in the context of this BddVariableSet
. Panic if some
variables are unknown.
pub fn eval_expression_string(&self, expression: &str) -> Bdd
[src]
Evaluate the given String
as a BooleanExpression
in the context of this BddVariableSet
.
Panics if the expression cannot be parsed or contains unknown variables.
impl BddVariableSet
[src]
pub fn new_anonymous(num_vars: u16) -> BddVariableSet
[src]
Create a new BddVariableSet
with anonymous variables $(x_1, \ldots, x_n)$ where $n$ is
the num_vars
parameter.
pub fn new(vars: Vec<&str>) -> BddVariableSet
[src]
Create a new BddVariableSet
with the given named variables. Same as using the
BddVariablesBuilder
with this name vector, but no BddVariable
objects are returned.
Panics: vars
must contain unique names which are allowed as variable names.
pub fn num_vars(&self) -> u16
[src]
Return the number of variables in this set.
pub fn var_by_name(&self, name: &str) -> Option<BddVariable>
[src]
Create a BddVariable
based on a variable name. If the name does not appear
in this set, return None
.
pub fn variables(&self) -> Vec<BddVariable>
[src]
Provides a vector of all BddVariable
s in this set.
pub fn name_of(&self, variable: BddVariable) -> String
[src]
Obtain the name of a specific BddVariable
.
pub fn mk_true(&self) -> Bdd
[src]
Create a Bdd
corresponding to the true
formula.
pub fn mk_false(&self) -> Bdd
[src]
Create a Bdd
corresponding to the false
formula.
pub fn mk_var(&self, var: BddVariable) -> Bdd
[src]
Create a Bdd
corresponding to the $v$ formula where v
is a specific variable in
this set.
Panics: var
must be a valid variable in this set.
pub fn mk_not_var(&self, var: BddVariable) -> Bdd
[src]
Create a BDD corresponding to the $\neg v$ formula where v
is a specific variable in
this set.
Panics: var
must be a valid variable in this set.
pub fn mk_literal(&self, var: BddVariable, value: bool) -> Bdd
[src]
Create a BDD corresponding to the $v <=> \texttt{value}$ formula.
Panics: var
must be a valid variable in this set.
pub fn mk_var_by_name(&self, var: &str) -> Bdd
[src]
Create a BDD corresponding to the $v$ formula where v
is a variable in this set.
Panics: var
must be a name of a valid variable in this set.
pub fn mk_not_var_by_name(&self, var: &str) -> Bdd
[src]
Create a BDD corresponding to the $\neg v$ formula where v
is a variable in this set.
Panics: var
must be a name of a valid variable in this set.
Trait Implementations
impl Clone for BddVariableSet
[src]
pub fn clone(&self) -> BddVariableSet
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl RefUnwindSafe for BddVariableSet
impl Send for BddVariableSet
impl Sync for BddVariableSet
impl Unpin for BddVariableSet
impl UnwindSafe for BddVariableSet
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,