Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | solver: Add a debug assertion. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
f7d5aaf42447c498a702df098c6e8645 |
| User & Date: | fifr 2016-10-06 06:27:13.930 |
Context
|
2016-10-06
| ||
| 09:28 | solver: Call `update_problem` only once per iteration. check-in: d08662bfb8 user: fifr tags: trunk | |
| 06:27 | solver: Add a debug assertion. check-in: f7d5aaf424 user: fifr tags: trunk | |
| 06:26 | master::minimal: Fix returned coefficients in `aggregate`. check-in: c772d1e0bc user: fifr tags: trunk | |
Changes
Changes to src/solver.rs.
| ︙ | ︙ | |||
699 700 701 702 703 704 705 706 707 708 709 710 711 712 |
let aggr = self.minorants[i].split_off(self.params.max_bundle_size-2);
let aggr_sum = aggr.iter().map(|m| m.multiplier).sum();
let (aggr_mins, aggr_primals) : (Vec<_>, Vec<_>) = aggr.into_iter().map(|m| {
(m.index, m.primal.unwrap())
}).unzip();
let (aggr_min, aggr_coeffs) = try!(self.master.aggregate(i, &aggr_mins));
// append aggregated minorant
self.minorants[i].push(MinorantInfo{
index: aggr_min,
multiplier: aggr_sum,
primal: Some(self.problem.aggregate_primals(&aggr_coeffs, aggr_primals)),
});
}
}
| > | 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 |
let aggr = self.minorants[i].split_off(self.params.max_bundle_size-2);
let aggr_sum = aggr.iter().map(|m| m.multiplier).sum();
let (aggr_mins, aggr_primals) : (Vec<_>, Vec<_>) = aggr.into_iter().map(|m| {
(m.index, m.primal.unwrap())
}).unzip();
let (aggr_min, aggr_coeffs) = try!(self.master.aggregate(i, &aggr_mins));
// append aggregated minorant
debug_assert_eq!(aggr_coeffs.len(), aggr_primals.len());
self.minorants[i].push(MinorantInfo{
index: aggr_min,
multiplier: aggr_sum,
primal: Some(self.problem.aggregate_primals(&aggr_coeffs, aggr_primals)),
});
}
}
|
| ︙ | ︙ |