pub struct Problem<'a, GradientType, ConstraintType, CostType, T = f64>where
GradientType: Fn(&[T], &mut [T]) -> FunctionCallResult,
CostType: Fn(&[T], &mut T) -> FunctionCallResult,
ConstraintType: Constraint<T>,{ /* 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, T> Problem<'a, GradientType, ConstraintType, CostType, T>where
GradientType: Fn(&[T], &mut [T]) -> FunctionCallResult,
CostType: Fn(&[T], &mut T) -> FunctionCallResult,
ConstraintType: Constraint<T>,
impl<'a, GradientType, ConstraintType, CostType, T> Problem<'a, GradientType, ConstraintType, CostType, T>where
GradientType: Fn(&[T], &mut [T]) -> FunctionCallResult,
CostType: Fn(&[T], &mut T) -> FunctionCallResult,
ConstraintType: Constraint<T>,
Sourcepub fn new(
constraints: &'a ConstraintType,
cost_gradient: GradientType,
cost: CostType,
) -> Problem<'a, GradientType, ConstraintType, CostType, T>
pub fn new( constraints: &'a ConstraintType, cost_gradient: GradientType, cost: CostType, ) -> Problem<'a, GradientType, ConstraintType, CostType, T>
Auto Trait Implementations§
impl<'a, GradientType, ConstraintType, CostType, T> Freeze for Problem<'a, GradientType, ConstraintType, CostType, T>
impl<'a, GradientType, ConstraintType, CostType, T> RefUnwindSafe for Problem<'a, GradientType, ConstraintType, CostType, T>where
GradientType: RefUnwindSafe,
CostType: RefUnwindSafe,
ConstraintType: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, GradientType, ConstraintType, CostType, T> Send for Problem<'a, GradientType, ConstraintType, CostType, T>
impl<'a, GradientType, ConstraintType, CostType, T> Sync for Problem<'a, GradientType, ConstraintType, CostType, T>
impl<'a, GradientType, ConstraintType, CostType, T> Unpin for Problem<'a, GradientType, ConstraintType, CostType, T>
impl<'a, GradientType, ConstraintType, CostType, T> UnsafeUnpin for Problem<'a, GradientType, ConstraintType, CostType, T>where
GradientType: UnsafeUnpin,
CostType: UnsafeUnpin,
impl<'a, GradientType, ConstraintType, CostType, T> UnwindSafe for Problem<'a, GradientType, ConstraintType, CostType, T>
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