Skip to main content

MultiSolver

Struct MultiSolver 

Source
pub struct MultiSolver<T> { /* private fields */ }
Expand description

treats multiple SatSolvers as one SatSolver

Implementations§

Source§

impl<T> MultiSolver<T>

Source

pub fn next(&mut self)

rotate to the next solver

Source

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

return a mutable slice of SatSolvers

Source§

impl<T> MultiSolver<T>
where T: SatSolver,

Source

pub fn new_by_size(n: usize) -> Self

n > 0

Trait Implementations§

Source§

impl<T, C> AddConstraints<C> for MultiSolver<T>
where T: AddConstraints<C>,

Source§

fn insert(&mut self, constraints: &C)

Source§

impl<T> SatSolver for MultiSolver<T>
where T: SatSolver,

Source§

type Status = <T as SatSolver>::Status

Source§

fn new() -> Self

Create a new SAT solver
Source§

fn solve(&mut self) -> Self::Status

Decide whether current constraints are satisfiable or not
Source§

fn val(&mut self, lit: i32) -> bool

After Self::solve returns sat, query the solver for the boolean value of the SAT variable lit. Read more
Source§

fn load_model(&mut self) -> Model

After Self::solve returns sat, obtain the full model.
Source§

fn block_model(&mut self)

After Self::solve returns sat, block the current model. It is useful for model enumeration.

Auto Trait Implementations§

§

impl<T> Freeze for MultiSolver<T>

§

impl<T> RefUnwindSafe for MultiSolver<T>
where T: RefUnwindSafe,

§

impl<T> Send for MultiSolver<T>
where T: Send,

§

impl<T> Sync for MultiSolver<T>
where T: Sync,

§

impl<T> Unpin for MultiSolver<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for MultiSolver<T>

§

impl<T> UnwindSafe for MultiSolver<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.