Enum satoxid::VarType[][src]

pub enum VarType<V> {
    Named(Lit<V>),
    Unnamed(i32),
}
Expand description

Type which represents every used SAT variable by the encoder. It is either a named user defined SAT variable. Or an unnamed generated SAT variable.

Variants

Named(Lit<V>)
Unnamed(i32)

Trait Implementations

impl<V: Clone> Clone for VarType<V>[src]

fn clone(&self) -> VarType<V>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<V: Debug> Debug for VarType<V>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<V: SatVar> From<Lit<V>> for VarType<V>[src]

fn from(l: Lit<V>) -> Self[src]

Performs the conversion.

impl<V: SatVar> From<V> for VarType<V>[src]

fn from(v: V) -> Self[src]

Performs the conversion.

impl<V: Hash> Hash for VarType<V>[src]

fn hash<__H: Hasher>(&self, state: &mut __H)[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

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

impl<V> Not for VarType<V>[src]

type Output = Self

The resulting type after applying the ! operator.

fn not(self) -> Self::Output[src]

Performs the unary ! operation. Read more

impl<V: Ord> Ord for VarType<V>[src]

fn cmp(&self, other: &VarType<V>) -> Ordering[src]

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

#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]

Compares and returns the maximum of two values. Read more

#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]

Compares and returns the minimum of two values. Read more

#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]

Restrict a value to a certain interval. Read more

impl<V: PartialEq> PartialEq<VarType<V>> for VarType<V>[src]

fn eq(&self, other: &VarType<V>) -> bool[src]

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

fn ne(&self, other: &VarType<V>) -> bool[src]

This method tests for !=.

impl<V: PartialOrd> PartialOrd<VarType<V>> for VarType<V>[src]

fn partial_cmp(&self, other: &VarType<V>) -> Option<Ordering>[src]

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

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

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

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

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

impl<V: Copy> Copy for VarType<V>[src]

impl<V: Eq> Eq for VarType<V>[src]

impl<V> StructuralEq for VarType<V>[src]

impl<V> StructuralPartialEq for VarType<V>[src]

Auto Trait Implementations

impl<V> RefUnwindSafe for VarType<V> where
    V: RefUnwindSafe

impl<V> Send for VarType<V> where
    V: Send

impl<V> Sync for VarType<V> where
    V: Sync

impl<V> Unpin for VarType<V> where
    V: Unpin

impl<V> UnwindSafe for VarType<V> where
    V: UnwindSafe

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<V, L> Constraint<V> for L where
    V: SatVar,
    L: Debug + Clone + Into<VarType<V>>, 
[src]

pub fn encode<S>(Self, &mut S, &mut VarMap<V>) where
    S: Backend
[src]

Encode Self as an constraint using solver.

impl<V, L> ConstraintRepr<V> for L where
    V: SatVar,
    L: Debug + Clone + Into<VarType<V>>, 
[src]

pub fn encode_constraint_implies_repr<S>(
    Self,
    Option<i32>,
    &mut S,
    &mut VarMap<V>
) -> i32 where
    S: Backend
[src]

Encode if Self is satisified, that repr is true.

pub fn encode_constraint_equals_repr<S>(
    Self,
    Option<i32>,
    &mut S,
    &mut VarMap<V>
) -> i32 where
    S: Backend
[src]

Encode if and only if Self is satisified, that repr is true.

pub fn encode_constraint_repr_cheap<S>(
    Self,
    Option<i32>,
    &mut S,
    &mut VarMap<V>
) -> i32 where
    S: Backend
[src]

Encode that repr is true if the constraint is satisfied. The semantics are less restrictive for to allow for cheaper encoding. No guarantees are given about the constraints of repr if the constraint is false. Usually it has either the semantics of implies_repr or equals_repr. Read more

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

pub fn from(t: !) -> T[src]

Performs the conversion.

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V> SatVar for V where
    V: Hash + Eq + Clone + Debug
[src]