Struct optimization_engine::core::problem::Problem
source · pub struct Problem<'a, GradientType, ConstraintType, CostType>where
GradientType: Fn(&[f64], &mut [f64]) -> FunctionCallResult,
CostType: Fn(&[f64], &mut f64) -> FunctionCallResult,
ConstraintType: Constraint,{ /* private fields */ }
Expand description
Definition of an optimisation problem
The definition of an optimisation problem involves:
- the gradient of the cost function
- the cost function
- the set of constraints, which is described by implementations of Constraint
Implementations§
source§impl<'a, GradientType, ConstraintType, CostType> Problem<'a, GradientType, ConstraintType, CostType>where
GradientType: Fn(&[f64], &mut [f64]) -> FunctionCallResult,
CostType: Fn(&[f64], &mut f64) -> FunctionCallResult,
ConstraintType: Constraint,
impl<'a, GradientType, ConstraintType, CostType> Problem<'a, GradientType, ConstraintType, CostType>where
GradientType: Fn(&[f64], &mut [f64]) -> FunctionCallResult,
CostType: Fn(&[f64], &mut f64) -> FunctionCallResult,
ConstraintType: Constraint,
sourcepub fn new(
constraints: &'a ConstraintType,
cost_gradient: GradientType,
cost: CostType
) -> Problem<'a, GradientType, ConstraintType, CostType>
pub fn new( constraints: &'a ConstraintType, cost_gradient: GradientType, cost: CostType ) -> Problem<'a, GradientType, ConstraintType, CostType>
Auto Trait Implementations§
impl<'a, GradientType, ConstraintType, CostType> Freeze for Problem<'a, GradientType, ConstraintType, CostType>
impl<'a, GradientType, ConstraintType, CostType> RefUnwindSafe for Problem<'a, GradientType, ConstraintType, CostType>
impl<'a, GradientType, ConstraintType, CostType> Send for Problem<'a, GradientType, ConstraintType, CostType>
impl<'a, GradientType, ConstraintType, CostType> Sync for Problem<'a, GradientType, ConstraintType, CostType>
impl<'a, GradientType, ConstraintType, CostType> Unpin for Problem<'a, GradientType, ConstraintType, CostType>
impl<'a, GradientType, ConstraintType, CostType> UnwindSafe for Problem<'a, GradientType, ConstraintType, CostType>
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