RsBundle  Diff

Differences From Artifact [ba7a4b93d6]:

  • File src/solver.rs — part of check-in [32372fda04] at 2018-12-12 15:38:03 on branch trunk — Replace `extern crate` with `use` (user: fifr size: 36996)

To Artifact [7bfe7b8320]:

  • File src/solver.rs — part of check-in [80086db562] at 2019-07-15 10:33:45 on branch trunk — solver: fix initialization of `Solver` in `solve_iter` (user: fifr size: 37077)

595
596
597
598
599
600
601



602
603
604
605
606
607
608
    /// has been satisfied. Otherwise it returns `Ok(false)` or an
    /// error code.
    ///
    /// If this function is called again, the solution process is
    /// continued from the previous point. Because of this one must
    /// call `init()` before the first call to this function.
    pub fn solve_iter(&mut self, niter: usize) -> Result<bool, SolverError<P::Err>> {



        for _ in 0..niter {
            let mut term = self.step()?;
            let changed = self.update_problem(term)?;
            // do not stop if the problem has been changed
            if changed && term == Step::Term {
                term = Step::Null
            }







>
>
>







595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
    /// has been satisfied. Otherwise it returns `Ok(false)` or an
    /// error code.
    ///
    /// If this function is called again, the solution process is
    /// continued from the previous point. Because of this one must
    /// call `init()` before the first call to this function.
    pub fn solve_iter(&mut self, niter: usize) -> Result<bool, SolverError<P::Err>> {
        // First initialize the internal data structures.
        self.init()?;

        for _ in 0..niter {
            let mut term = self.step()?;
            let changed = self.update_problem(term)?;
            // do not stop if the problem has been changed
            if changed && term == Step::Term {
                term = Step::Null
            }