Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Move convenience typs to crate level |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | master-builder |
| Files: | files | file ages | folders |
| SHA1: |
adb6de0ae80972028309a1f9b39d53cf |
| User & Date: | fifr 2019-07-22 09:05:02.801 |
Context
|
2019-07-22
| ||
| 09:39 | parallel: allow arbitrary master problems Closed-Leaf check-in: 6efb9f568a user: fifr tags: master-builder | |
| 09:05 | Move convenience typs to crate level check-in: adb6de0ae8 user: fifr tags: master-builder | |
| 08:54 | masterprocess: simplify some types check-in: 5e14cab158 user: fifr tags: master-builder | |
Changes
Changes to src/lib.rs.
| ︙ | ︙ | |||
32 33 34 35 36 37 38 |
pub mod minorant;
pub use crate::minorant::{Aggregatable, Minorant};
pub mod firstorderproblem;
pub use crate::firstorderproblem::{Evaluation, FirstOrderProblem, SimpleEvaluation, Update};
pub mod solver;
| | > > > > > > > > > | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
pub mod minorant;
pub use crate::minorant::{Aggregatable, Minorant};
pub mod firstorderproblem;
pub use crate::firstorderproblem::{Evaluation, FirstOrderProblem, SimpleEvaluation, Update};
pub mod solver;
pub use crate::solver::{BundleState, FullMasterBuilder, IterationInfo, Solver, SolverParams, Step, UpdateState};
pub mod parallel;
pub mod weighter;
pub mod terminator;
pub mod master;
pub mod mcf;
/// The minimal bundle builder.
pub type MinimalMasterBuilder = master::boxed::Builder<master::minimal::Builder>;
/// The default bundle solver with general master problem.
pub type DefaultSolver<P> = Solver<P, terminator::StandardTerminator, weighter::HKWeighter, FullMasterBuilder>;
/// A bundle solver with a minimal cutting plane model.
pub type NoBundleSolver<P> = Solver<P, terminator::StandardTerminator, weighter::HKWeighter, MinimalMasterBuilder>;
|
Changes to src/solver.rs.
| ︙ | ︙ | |||
15 16 17 18 19 20 21 |
//
//! The main bundle method solver.
use crate::{Aggregatable, DVector, Real};
use crate::{Evaluation, FirstOrderProblem, Update};
| | | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
//
//! The main bundle method solver.
use crate::{Aggregatable, DVector, Real};
use crate::{Evaluation, FirstOrderProblem, Update};
use crate::master::{self, MasterProblem};
use crate::terminator::{StandardTerminatable, StandardTerminator, Terminator};
use crate::weighter::{HKWeightable, HKWeighter, Weighter};
use log::{debug, info, warn};
use std::error::Error;
use std::f64::{INFINITY, NEG_INFINITY};
|
| ︙ | ︙ | |||
346 347 348 349 350 351 352 |
/// This is the last primal generated by the oracle.
pub fn last_primal(&self, fidx: usize) -> Option<&Pr> {
self.minorants[fidx].last().and_then(|m| m.primal.as_ref())
}
}
/// The default builder.
| | < < < < < < < < < | | 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 |
/// This is the last primal generated by the oracle.
pub fn last_primal(&self, fidx: usize) -> Option<&Pr> {
self.minorants[fidx].last().and_then(|m| m.primal.as_ref())
}
}
/// The default builder.
pub type FullMasterBuilder = master::boxed::Builder<master::cpx::Builder>;
/**
* Implementation of a bundle method.
*/
pub struct Solver<P, T = StandardTerminator, W = HKWeighter, M = FullMasterBuilder>
where
P: FirstOrderProblem,
M: master::Builder,
{
/// The first order problem description.
problem: P,
|
| ︙ | ︙ |