RsBundle  Check-in [80086db562]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:solver: fix initialization of `Solver` in `solve_iter`
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 80086db56298e722cdb49ee36e51d9aa75ca2b91
User & Date: fifr 2019-07-15 10:33:45.348
Context
2019-07-15
10:34
Update version to 0.5.2 check-in: fd1969675e user: fifr tags: trunk, v0.5.2
10:33
solver: fix initialization of `Solver` in `solve_iter` check-in: 80086db562 user: fifr tags: trunk
2018-12-12
20:46
Update env_logger to 0.6 check-in: a1e36ba638 user: fifr tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/solver.rs.
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
            }