[−][src]Struct screwsat::solver::Solver
Fields
models: Vec<LitBool>
status: Option<Status>
Implementations
impl Solver
[src]
pub fn new(n: usize, clauses: &[Vec<Lit>]) -> Solver
[src]
Create a new Solver
struct
Arguments
n
- The number of variableclauses
- All clauses that solver solves
pub fn new_var(&mut self)
[src]
pub fn add_clause(&mut self, clause: &[Lit])
[src]
Add a new clause to clauses
and watch a clause.
If a variable is greater than the size of array, grow it.
Arguments
clause
- a clause has one or some literal variables
pub fn reserve_clause(&mut self, cla_num: usize)
[src]
pub fn reserve_variable(&mut self, var_num: usize)
[src]
Arguments
var_num
- The number of variable
pub fn solve(&mut self, time_limit: Option<Duration>) -> Status
[src]
Solve a problem and return a enum Status
.
Arguments
time_limit
- The time limitation for searching. Exceeding the time limit returnsIndeterminate
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Solver
[src]
impl Send for Solver
[src]
impl Sync for Solver
[src]
impl Unpin for Solver
[src]
impl UnwindSafe for Solver
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,