pub struct IpasirSolver<'lib> { /* private fields */ }Expand description
Instance of a dynamically loaded IPASIR solver, created using a
IpasirLibrary.
Implementations§
Trait Implementations§
Source§impl Assumptions for IpasirSolver<'_>
impl Assumptions for IpasirSolver<'_>
Source§fn solve_assuming<I: IntoIterator<Item = Lit>>(
&mut self,
assumptions: I,
) -> SolveResult<IpasirSol<'_>, IpasirFailed<'_>>
fn solve_assuming<I: IntoIterator<Item = Lit>>( &mut self, assumptions: I, ) -> SolveResult<IpasirSol<'_>, IpasirFailed<'_>>
Solve the formula with specified clauses under the given assumptions. Read more
Source§impl ClauseDatabase for IpasirSolver<'_>
impl ClauseDatabase for IpasirSolver<'_>
Source§fn add_clause_from_slice(&mut self, clause: &[Lit]) -> Result<(), Unsatisfiable>
fn add_clause_from_slice(&mut self, clause: &[Lit]) -> Result<(), Unsatisfiable>
Add a clause to the
ClauseDatabase. The database is allowed to return
Unsatisfiable when the collection of clauses has been proven to be
unsatisfiable. This is used as a signal to the encoder that any
subsequent encoding effort can be abandoned.Source§impl Debug for IpasirSolver<'_>
impl Debug for IpasirSolver<'_>
Source§impl Drop for IpasirSolver<'_>
impl Drop for IpasirSolver<'_>
Source§impl LearnCallback for IpasirSolver<'_>
impl LearnCallback for IpasirSolver<'_>
Source§impl Solver for IpasirSolver<'_>
impl Solver for IpasirSolver<'_>
Source§fn solve(&mut self) -> SolveResult<IpasirSol<'_>, IpasirFailed<'_>>
fn solve(&mut self) -> SolveResult<IpasirSol<'_>, IpasirFailed<'_>>
Solve the formula with specified clauses. Read more
Source§impl TerminateCallback for IpasirSolver<'_>
impl TerminateCallback for IpasirSolver<'_>
Source§fn set_terminate_callback<F: FnMut() -> TermSignal + 'static>(
&mut self,
cb: Option<F>,
)
fn set_terminate_callback<F: FnMut() -> TermSignal + 'static>( &mut self, cb: Option<F>, )
Set a callback function used to indicate a termination requirement to
the solver. Read more
Auto Trait Implementations§
impl<'lib> !RefUnwindSafe for IpasirSolver<'lib>
impl<'lib> !Send for IpasirSolver<'lib>
impl<'lib> !Sync for IpasirSolver<'lib>
impl<'lib> !UnwindSafe for IpasirSolver<'lib>
impl<'lib> Freeze for IpasirSolver<'lib>
impl<'lib> Unpin for IpasirSolver<'lib>
impl<'lib> UnsafeUnpin for IpasirSolver<'lib>
Blanket Implementations§
Source§impl<T> AsDynClauseDatabase for Twhere
T: ClauseDatabase,
impl<T> AsDynClauseDatabase for Twhere
T: ClauseDatabase,
Source§fn as_dyn(&self) -> &dyn ClauseDatabase
fn as_dyn(&self) -> &dyn ClauseDatabase
Cast the object reference to a dynamic trait object reference.
Source§fn as_mut_dyn(&mut self) -> &mut dyn ClauseDatabase
fn as_mut_dyn(&mut self) -> &mut dyn ClauseDatabase
Cast the object mutable reference to a mutable dynamic trait object
reference.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<Db> ClauseDatabaseTools for Dbwhere
Db: ClauseDatabase + ?Sized,
impl<Db> ClauseDatabaseTools for Dbwhere
Db: ClauseDatabase + ?Sized,
Source§fn add_clause<Iter>(&mut self, clause: Iter) -> Result<(), Unsatisfiable>
fn add_clause<Iter>(&mut self, clause: Iter) -> Result<(), Unsatisfiable>
Add a clause, given as any to the
ClauseDatabase. The database is
allowed to return Unsatisfiable when the collection of clauses has
been proven to be unsatisfiable. This is used as a signal to the
encoder that any subsequent encoding effort can be abandoned.Source§fn contradiction(&mut self) -> Result<(), Unsatisfiable>
fn contradiction(&mut self) -> Result<(), Unsatisfiable>
Encoder helper that signals a contradiction has been detected in the
constraint being encoded. Read more
Source§fn encode<C, E>(
&mut self,
constraint: &C,
encoder: &E,
) -> Result<(), Unsatisfiable>
fn encode<C, E>( &mut self, constraint: &C, encoder: &E, ) -> Result<(), Unsatisfiable>
Encode a constraint using the provided encoder.
Source§fn encode_implied<C, E>(
&mut self,
conditions: &[Lit],
constraint: &C,
encoder: &E,
) -> Result<(), Unsatisfiable>
fn encode_implied<C, E>( &mut self, conditions: &[Lit], constraint: &C, encoder: &E, ) -> Result<(), Unsatisfiable>
Encode an implied constraint of the form
conditions -> constraint. Read moreSource§fn new_lits<T>(&mut self) -> Twhere
T: HomogeneousTuple<Item = Lit>,
fn new_lits<T>(&mut self) -> Twhere
T: HomogeneousTuple<Item = Lit>,
Create multiple new Boolean literals and capture them in a tuple. Read more
Source§fn new_named_lit(&mut self, name: &str) -> Lit
fn new_named_lit(&mut self, name: &str) -> Lit
Create a new Boolean variable in the form of a positive literal. The
given name is used when the variable is output by the tracer.
Source§fn new_named_var(&mut self, name: &str) -> Var
fn new_named_var(&mut self, name: &str) -> Var
Create a new Boolean variable that can be used in the encoding of a
problem. The given name is used when the variable is output by the
tracer.
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more