[−][src]Struct batsat::clause::Lit
Implementations
impl Lit
[src]
pub const UNDEF: Lit
[src]
pub const ERROR: Lit
[src]
pub fn new(var: Var, sign: bool) -> Self
[src]
pub fn idx(&self) -> u32
[src]
pub fn sign(&self) -> bool
[src]
pub fn var(&self) -> Var
[src]
pub fn apply_sign(&self, sign: bool) -> Lit
[src]
lit.apply_sign(b)
keeps the same sign if b==true
, flips sign otherwise
use batsat::*; let mut sat = BasicSolver::default(); let lit1 = Lit::new(sat.new_var_default(), true); assert_eq!(lit1, lit1.apply_sign(true)); assert_eq!(!lit1, lit1.apply_sign(false)); let lit2 = Lit::new(sat.new_var_default(), false); assert_ne!(lit1.var(), lit2.var()); assert_eq!(lit2, lit2.apply_sign(true)); assert_eq!(!lit2, lit2.apply_sign(false));
Trait Implementations
impl AsIndex for Lit
[src]
impl BitXor<bool> for Lit
[src]
type Output = Self
The resulting type after applying the ^
operator.
pub fn bitxor(self, rhs: bool) -> Self
[src]
impl BitXorAssign<bool> for Lit
[src]
pub fn bitxor_assign(&mut self, rhs: bool)
[src]
impl Clone for Lit
[src]
impl Copy for Lit
[src]
impl Debug for Lit
[src]
impl Eq for Lit
[src]
impl Hash for Lit
[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Not for Lit
[src]
impl Ord for Lit
[src]
pub fn cmp(&self, other: &Lit) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Lit> for Lit
[src]
impl PartialOrd<Lit> for Lit
[src]
pub fn partial_cmp(&self, other: &Lit) -> Option<Ordering>
[src]
pub fn lt(&self, other: &Lit) -> bool
[src]
pub fn le(&self, other: &Lit) -> bool
[src]
pub fn gt(&self, other: &Lit) -> bool
[src]
pub fn ge(&self, other: &Lit) -> bool
[src]
impl StructuralEq for Lit
[src]
impl StructuralPartialEq for Lit
[src]
Auto Trait Implementations
impl RefUnwindSafe for Lit
[src]
impl Send for Lit
[src]
impl Sync for Lit
[src]
impl Unpin for Lit
[src]
impl UnwindSafe for Lit
[src]
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>,