pub struct LowRankHessian {
pub sigma: Number,
pub vecs: Vec<Vec<Number>>,
pub signs: Vec<Number>,
}Expand description
B = σI + Σᵢ signᵢ vᵢ vᵢᵀ — the L-BFGS matrix in product form, with no
n × n storage (gh#1054).
Each stored pair contributes one −a aᵀ and one +b bᵀ term,
a = B s / √(sᵀB s) and b = ȳ / √(sᵀȳ) with ȳ the Powell-damped
y — the same rank-2 update LBfgs::as_triplet replays densely, so
the two describe one matrix. A pair the dense replay skips (sᵀBs or
sᵀȳ below 1e-14) is skipped here too.
Fields§
§sigma: Number§vecs: Vec<Vec<Number>>The vᵢ, each of length n.
signs: Vec<Number>−1 or +1 per vector.
Implementations§
Source§impl LowRankHessian
impl LowRankHessian
Sourcepub fn max_abs_entry(&self) -> Number
pub fn max_abs_entry(&self) -> Number
max |B_ij|. B is positive definite (BFGS with Powell damping),
and for a PSD matrix the largest entry in magnitude sits on the
diagonal (|B_ij| ≤ √(B_ii B_jj)), so this is the dense
matrix’s max-norm exactly, at O(k n).
Trait Implementations§
Source§impl Clone for LowRankHessian
impl Clone for LowRankHessian
Auto Trait Implementations§
impl Freeze for LowRankHessian
impl RefUnwindSafe for LowRankHessian
impl Send for LowRankHessian
impl Sync for LowRankHessian
impl Unpin for LowRankHessian
impl UnsafeUnpin for LowRankHessian
impl UnwindSafe for LowRankHessian
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T, U> Imply<T> for U
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