pub struct TruthTable {
pub variables: Vec<String>,
pub values: Vec<Ternary>,
}Expand description
一个表达式的完整真值表结果。
Fields§
§variables: Vec<String>变量名(按编号顺序)。
values: Vec<Ternary>每组赋值的结果值。
Implementations§
Source§impl TruthTable
impl TruthTable
Sourcepub fn distinct_values(&self) -> Vec<Ternary>
pub fn distinct_values(&self) -> Vec<Ternary>
结果中出现过的不同取值集合(升序)。
Sourcepub fn is_always_false(&self) -> bool
pub fn is_always_false(&self) -> bool
结果全为假。
Sourcepub fn is_always_true(&self) -> bool
pub fn is_always_true(&self) -> bool
结果全为真。
Sourcepub fn has_unknown(&self) -> bool
pub fn has_unknown(&self) -> bool
结果是否含未知。
Trait Implementations§
Source§impl Clone for TruthTable
impl Clone for TruthTable
Auto Trait Implementations§
impl Freeze for TruthTable
impl RefUnwindSafe for TruthTable
impl Send for TruthTable
impl Sync for TruthTable
impl Unpin for TruthTable
impl UnsafeUnpin for TruthTable
impl UnwindSafe for TruthTable
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more