Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | solver: do not call `init` in `solver_iter`. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
fb00b3c18e40218d7096d0f160cdad68 |
| User & Date: | fifr 2017-04-18 13:08:24.088 |
Context
|
2017-04-18
| ||
| 13:08 | Fix some errors with temporary CString objects. check-in: 81d61cf110 user: fifr tags: trunk | |
| 13:08 | solver: do not call `init` in `solver_iter`. check-in: fb00b3c18e user: fifr tags: trunk | |
| 13:04 | Solver::solve returns `Error::IterationLimit` if limit has been reached. check-in: 9bbb1b8836 user: fifr tags: trunk | |
Changes
Changes to src/solver.rs.
| ︙ | ︙ | |||
576 577 578 579 580 581 582 583 |
}
/// Solve the problem but stop after `niter` iterations.
///
/// The function returns `Ok(true)` if the termination criterion
/// has been satisfied. Otherwise it returns `Ok(false)` or an
/// error code.
pub fn solve_iter(&mut self, niter: usize) -> Result<bool> {
| > > > > < | 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 |
}
/// Solve the problem but stop after `niter` iterations.
///
/// The function returns `Ok(true)` if the termination criterion
/// 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> {
for _ in 0..niter {
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
}
|
| ︙ | ︙ |