[−][src]Struct optimization_engine::core::fbs::FBSOptimizer
Optimiser using forward-backward splitting iterations (projected gradient)
Note that an FBSOptimizer holds a reference to an instance of FBSEngine
which needs to be created externally. A mutable reference to that FBSEgnine
is provided to the optimizer.
The FBSEngine is supposed to be updated whenever you need to solve
a different optimization problem.
Methods
impl<'a, GradientType, ConstraintType, CostType> FBSOptimizer<'a, GradientType, ConstraintType, CostType> where
GradientType: Fn(&[f64], &mut [f64]) -> Result<(), SolverError>,
CostType: Fn(&[f64], &mut f64) -> Result<(), SolverError>,
ConstraintType: Constraint, [src]
GradientType: Fn(&[f64], &mut [f64]) -> Result<(), SolverError>,
CostType: Fn(&[f64], &mut f64) -> Result<(), SolverError>,
ConstraintType: Constraint,
pub fn new(
problem: Problem<'a, GradientType, ConstraintType, CostType>,
cache: &'a mut FBSCache
) -> FBSOptimizer<'a, GradientType, ConstraintType, CostType>[src]
problem: Problem<'a, GradientType, ConstraintType, CostType>,
cache: &'a mut FBSCache
) -> FBSOptimizer<'a, GradientType, ConstraintType, CostType>
pub fn with_tolerance(
self,
tolerance: f64
) -> FBSOptimizer<'a, GradientType, ConstraintType, CostType>[src]
self,
tolerance: f64
) -> FBSOptimizer<'a, GradientType, ConstraintType, CostType>
pub fn with_max_iter(
self,
max_iter: usize
) -> FBSOptimizer<'a, GradientType, ConstraintType, CostType>[src]
self,
max_iter: usize
) -> FBSOptimizer<'a, GradientType, ConstraintType, CostType>
Sets the maximum number of iterations
pub fn with_max_duration(
self,
max_duration: Duration
) -> FBSOptimizer<'a, GradientType, ConstraintType, CostType>[src]
self,
max_duration: Duration
) -> FBSOptimizer<'a, GradientType, ConstraintType, CostType>
Sets the maximum number of iterations
Trait Implementations
impl<'life, GradientType, ConstraintType, CostType> Optimizer for FBSOptimizer<'life, GradientType, ConstraintType, CostType> where
GradientType: Fn(&[f64], &mut [f64]) -> Result<(), SolverError> + 'life,
CostType: Fn(&[f64], &mut f64) -> Result<(), SolverError> + 'life,
ConstraintType: Constraint + 'life, [src]
GradientType: Fn(&[f64], &mut [f64]) -> Result<(), SolverError> + 'life,
CostType: Fn(&[f64], &mut f64) -> Result<(), SolverError> + 'life,
ConstraintType: Constraint + 'life,
fn solve(&mut self, u: &mut [f64]) -> Result<SolverStatus, SolverError>[src]
Auto Trait Implementations
impl<'a, GradientType, ConstraintType, CostType> Send for FBSOptimizer<'a, GradientType, ConstraintType, CostType> where
ConstraintType: Sync,
CostType: Send,
GradientType: Send,
ConstraintType: Sync,
CostType: Send,
GradientType: Send,
impl<'a, GradientType, ConstraintType, CostType> Sync for FBSOptimizer<'a, GradientType, ConstraintType, CostType> where
ConstraintType: Sync,
CostType: Sync,
GradientType: Sync,
ConstraintType: Sync,
CostType: Sync,
GradientType: Sync,
Blanket Implementations
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,