Trait satoxid::Constraint[][src]

pub trait Constraint<V: SatVar>: Debug + Sized + Clone {
    fn encode<B: Backend>(self, backend: &mut B, varmap: &mut VarMap<V>);
}
Expand description

Trait used to express a constraint. Constraints generate a finite set of clauses which are passed to the given backend.

Required methods

fn encode<B: Backend>(self, backend: &mut B, varmap: &mut VarMap<V>)[src]

Encode Self as an constraint using solver.

Implementors

impl<I1, I2, V> Constraint<V> for LessCardinality<I1, I2> where
    V: SatVar,
    I1: Iterator + Clone,
    I1::Item: Into<VarType<V>> + Debug,
    I2: Iterator + Clone,
    I2::Item: Into<VarType<V>> + Debug
[src]

fn encode<S: Backend>(self, solver: &mut S, varmap: &mut VarMap<V>)[src]

impl<I, V> Constraint<V> for Or<I> where
    V: SatVar,
    I: Iterator + Clone,
    I::Item: Into<VarType<V>> + Debug
[src]

fn encode<B: Backend>(self, backend: &mut B, varmap: &mut VarMap<V>)[src]

impl<V, C> Constraint<V> for Not<C> where
    V: SatVar,
    C: ConstraintRepr<V>, 
[src]

fn encode<B: Backend>(self, backend: &mut B, varmap: &mut VarMap<V>)[src]

impl<V, C, T> Constraint<V> for If<C, T> where
    V: SatVar,
    C: ConstraintRepr<V>,
    T: Constraint<V>, 
[src]

fn encode<B: Backend>(self, backend: &mut B, varmap: &mut VarMap<V>)[src]

impl<V, I> Constraint<V> for And<I> where
    V: SatVar,
    I: Iterator + Clone,
    I::Item: Into<VarType<V>> + Debug
[src]

fn encode<B: Backend>(self, backend: &mut B, varmap: &mut VarMap<V>)[src]

impl<V, I> Constraint<V> for AtLeastK<I> where
    V: SatVar,
    I: Iterator + Clone,
    I::Item: Into<VarType<V>> + Debug
[src]

fn encode<S: Backend>(self, solver: &mut S, varmap: &mut VarMap<V>)[src]

impl<V, I> Constraint<V> for AtMostK<I> where
    V: SatVar,
    I: Iterator + Clone,
    I::Item: Into<VarType<V>> + Debug
[src]

fn encode<S: Backend>(self, solver: &mut S, varmap: &mut VarMap<V>)[src]

impl<V, I> Constraint<V> for Equal<I> where
    V: SatVar,
    I: Iterator + Clone,
    I::Item: Into<VarType<V>> + Debug
[src]

fn encode<B: Backend>(self, backend: &mut B, varmap: &mut VarMap<V>)[src]

impl<V, I> Constraint<V> for ExactlyK<I> where
    V: SatVar,
    I: Iterator + Clone,
    I::Item: Into<VarType<V>> + Debug
[src]

fn encode<S: Backend>(self, solver: &mut S, varmap: &mut VarMap<V>)[src]

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

fn encode<B: Backend>(self, backend: &mut B, varmap: &mut VarMap<V>)[src]

impl<V: SatVar> Constraint<V> for Expr<V>[src]

fn encode<B: Backend>(self, backend: &mut B, varmap: &mut VarMap<V>)[src]

impl<V: SatVar> Constraint<V> for SameCardinality<V>[src]

fn encode<S: Backend>(self, solver: &mut S, varmap: &mut VarMap<V>)[src]