Struct satoxid::Encoder [−][src]
Expand description
The Encoder type contains all data used for the encoding.
Fields
backend: S
varmap: VarMap<V>
debug: bool
Implementations
impl<V: SatVar, S: Default> Encoder<V, S>
[src]
impl<V: SatVar, S: Default> Encoder<V, S>
[src]pub fn with_debug() -> Self
[src]
pub fn with_debug() -> Self
[src]Creates a new encoder and will print out every encoded constraint.
impl<V, B> Encoder<V, B> where
V: SatVar,
B: Backend,
[src]
impl<V, B> Encoder<V, B> where
V: SatVar,
B: Backend,
[src]pub fn with_backend(backend: B) -> Self
[src]
pub fn with_backend(backend: B) -> Self
[src]Create a new Encoder using backend
as the Backend.
pub fn add_constraint<C: Constraint<V>>(&mut self, constraint: C)
[src]
pub fn add_constraint<C: Constraint<V>>(&mut self, constraint: C)
[src]Encode a constraint.
pub fn add_constraint_implies_repr<C: ConstraintRepr<V>>(
&mut self,
constraint: C
) -> VarType<V>
[src]
pub fn add_constraint_implies_repr<C: ConstraintRepr<V>>(
&mut self,
constraint: C
) -> VarType<V>
[src]Encode a constraint such that a variable represents it. If the constraint in the solved model is true, the return variable (repr) will also be true. Otherwise there it doesn’t constrain repr which can either be true or false.
pub fn add_constraint_equals_repr<C: ConstraintRepr<V>>(
&mut self,
constraint: C
) -> VarType<V>
[src]
pub fn add_constraint_equals_repr<C: ConstraintRepr<V>>(
&mut self,
constraint: C
) -> VarType<V>
[src]Encode a constraint such that a variable represents it.
Like add_constraint_implies_repr
but the value of repr will equal the
constraint satisfied.
So if constraint wasn’t satisfied, repr will be false.
Auto Trait Implementations
impl<V, S> RefUnwindSafe for Encoder<V, S> where
S: RefUnwindSafe,
V: RefUnwindSafe,
S: RefUnwindSafe,
V: RefUnwindSafe,
impl<V, S> Send for Encoder<V, S> where
S: Send,
V: Send,
S: Send,
V: Send,
impl<V, S> Sync for Encoder<V, S> where
S: Sync,
V: Sync,
S: Sync,
V: Sync,
impl<V, S> Unpin for Encoder<V, S> where
S: Unpin,
V: Unpin,
S: Unpin,
V: Unpin,
impl<V, S> UnwindSafe for Encoder<V, S> where
S: UnwindSafe,
V: UnwindSafe,
S: UnwindSafe,
V: UnwindSafe,