RsBundle  Diff

Differences From Artifact [1b2d1b0ca6]:

  • File src/solver.rs — part of check-in [f7d5aaf424] at 2016-10-06 06:27:13 on branch trunk — solver: Add a debug assertion. (user: fifr size: 29117)

To Artifact [0e8d373bd7]:

  • File src/solver.rs — part of check-in [d08662bfb8] at 2016-10-06 09:28:32 on branch trunk — solver: Call `update_problem` only once per iteration. (user: fifr size: 29072)

503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
503
504
505
506
507
508
509

510
511
512
513
514
515
516







-







    pub fn solve(&mut self) -> Result<()> {
        try!(self.init());
        for _ in 0..100000 {
            let mut term = try!(self.step());
            let changed = try!(self.update_problem(term));
            // do not stop if the problem has been changed
            if changed && term == Step::Term { term = Step::Null }
            try!(self.update_problem(term));
            self.show_info(term);
            if term == Step::Term {
                break;
            }
        }
        Ok(())
    }