Struct optimization_engine::core::fbs::FBSOptimizer [−][src]
pub struct FBSOptimizer<'a, GradientType, ConstraintType, CostType> where
GradientType: Fn(&[f64], &mut [f64]) -> FunctionCallResult,
CostType: Fn(&[f64], &mut f64) -> FunctionCallResult,
ConstraintType: Constraint, { /* fields omitted */ }
Expand description
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.
Implementations
impl<'a, GradientType, ConstraintType, CostType> FBSOptimizer<'a, GradientType, ConstraintType, CostType> where
GradientType: Fn(&[f64], &mut [f64]) -> FunctionCallResult,
CostType: Fn(&[f64], &mut f64) -> FunctionCallResult,
ConstraintType: Constraint,
impl<'a, GradientType, ConstraintType, CostType> FBSOptimizer<'a, GradientType, ConstraintType, CostType> where
GradientType: Fn(&[f64], &mut [f64]) -> FunctionCallResult,
CostType: Fn(&[f64], &mut f64) -> FunctionCallResult,
ConstraintType: Constraint,
Constructs a new instance of FBSOptimizer
Arguments
problem
: problem definitioncache
: instance ofFBSCache
pub fn with_tolerance(
self,
tolerance: f64
) -> FBSOptimizer<'a, GradientType, ConstraintType, CostType>
pub fn with_tolerance(
self,
tolerance: f64
) -> FBSOptimizer<'a, GradientType, ConstraintType, CostType>
pub fn with_max_iter(
self,
max_iter: usize
) -> FBSOptimizer<'a, GradientType, ConstraintType, CostType>
pub fn with_max_iter(
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>
pub fn with_max_duration(
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]) -> FunctionCallResult + 'life,
CostType: Fn(&[f64], &mut f64) -> FunctionCallResult + 'life,
ConstraintType: Constraint + 'life,
impl<'life, GradientType, ConstraintType, CostType> Optimizer for FBSOptimizer<'life, GradientType, ConstraintType, CostType> where
GradientType: Fn(&[f64], &mut [f64]) -> FunctionCallResult + 'life,
CostType: Fn(&[f64], &mut f64) -> FunctionCallResult + 'life,
ConstraintType: Constraint + 'life,
solves a given problem and updates the initial estimate u
with the solution Read more