pub struct DampedBfgs { /* private fields */ }Implementations§
Source§impl DampedBfgs
impl DampedBfgs
pub fn new(n: usize) -> Self
Sourcepub fn has_prev(&self) -> bool
pub fn has_prev(&self) -> bool
Have we recorded a previous (x, ∇L)? false until the
first call to Self::update.
Sourcepub fn update(&mut self, x_new: &[Number], grad_lag_new: &[Number])
pub fn update(&mut self, x_new: &[Number], grad_lag_new: &[Number])
Apply the Powell-damped BFGS update from the previous
(x_old, ∇L_old) to the supplied (x_new, ∇L_new). The
first call just stores the pair; subsequent calls also
modify B.
Sourcepub fn as_triplet(&self) -> Triplet
pub fn as_triplet(&self) -> Triplet
Produce the current B as a Triplet over the upper
triangle (1-based), ready to feed into SqpQpData::build.
Auto Trait Implementations§
impl Freeze for DampedBfgs
impl RefUnwindSafe for DampedBfgs
impl Send for DampedBfgs
impl Sync for DampedBfgs
impl Unpin for DampedBfgs
impl UnsafeUnpin for DampedBfgs
impl UnwindSafe for DampedBfgs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more