55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
-
+
|
bounds: Vec<(Real, Real)>,
sgext: Box<SubgradientExtender<P, E>>,
},
}
/// The subgradient extender is a callback used to update existing minorants
/// given their associated primal data.
pub type SubgradientExtender<P, E> = FnMut(usize, &P, &[usize]) -> Result<DVector, E> + Send;
pub type SubgradientExtender<P, E> = dyn FnMut(usize, &P, &[usize]) -> Result<DVector, E> + Send;
/// This trait provides information available in the
/// [`FirstOrderProblem::update`] method.
pub trait UpdateState<P> {
/// Whether the last step was a descent step.
fn was_descent(&self) -> bool;
|