RsBundle  Diff

Differences From Artifact [1b320ebacd]:

  • File src/solver.rs — part of check-in [2c9472f892] at 2019-07-22 11:50:12 on branch async — Move additional requirements to basic traits. This includes bounds on `Send` and `'static` so that master problems and function oracles can always be used in threads. The requirements have always been there as additional bounds for the solvers, but it is easier (and more descriptive) to state them in the basic traits. (user: fifr size: 35117)

To Artifact [c42c150531]:

  • File src/solver.rs — part of check-in [ff30e74d44] at 2019-07-25 10:31:27 on branch async — firstorderproblem: pass the subproblem index to `extend_subgradient` (user: fifr size: 35123) [more...]

686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
        if !newvars.is_empty() {
            let problem = &mut self.problem;
            let minorants = &self.minorants;
            self.master.add_vars(
                &newvars.iter().map(|v| (v.0, v.1, v.2)).collect::<Vec<_>>(),
                &mut |fidx, minidx, vars| {
                    problem
                        .extend_subgradient(minorants[fidx][minidx].primal.as_ref().unwrap(), vars)
                        .map(DVector)
                        .map_err(|e| e.into())
                },
            )?;
            // modify moved variables
            for (index, val) in newvars.iter().filter_map(|v| v.0.map(|i| (i, v.3))) {
                self.cur_y[index] = val;







|







686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
        if !newvars.is_empty() {
            let problem = &mut self.problem;
            let minorants = &self.minorants;
            self.master.add_vars(
                &newvars.iter().map(|v| (v.0, v.1, v.2)).collect::<Vec<_>>(),
                &mut |fidx, minidx, vars| {
                    problem
                        .extend_subgradient(fidx, minorants[fidx][minidx].primal.as_ref().unwrap(), vars)
                        .map(DVector)
                        .map_err(|e| e.into())
                },
            )?;
            // modify moved variables
            for (index, val) in newvars.iter().filter_map(|v| v.0.map(|i| (i, v.3))) {
                self.cur_y[index] = val;