pub struct FBSCache { /* private fields */ }Expand description
Cache for the forward-backward splitting (FBS), or projected gradient, algorithm
This struct allocates memory needed for the FBS algorithm
Implementations
sourceimpl FBSCache
impl FBSCache
sourcepub fn new(n: NonZeroUsize, gamma: f64, tolerance: f64) -> FBSCache
pub fn new(n: NonZeroUsize, gamma: f64, tolerance: f64) -> FBSCache
Construct a new instance of FBSCache
Arguments
gammaparameter gamma of the algorithmtolerancetolerance used for termination
Memory allocation
This method allocates new memory (which it owns, of course). You should avoid
constructing instances of FBSCache in a loop or in any way more than
absolutely necessary
If you need to call an optimizer more than once, perhaps with different
parameters, then construct an FBSCache only once
This method will allocate memory for 2*n + 3 floats
Panics
This method will panic if there is no available memory for the required allocation (capacity overflow)
Auto Trait Implementations
impl RefUnwindSafe for FBSCache
impl Send for FBSCache
impl Sync for FBSCache
impl Unpin for FBSCache
impl UnwindSafe for FBSCache
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more