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,

source

pub fn new( constraints: &'a ConstraintType, cost_gradient: GradientType, cost: CostType ) -> Problem<'a, GradientType, ConstraintType, CostType>

Construct a new instance of an optimisation problem

§Arguments
  • constraints constraints
  • cost_gradient gradient of the cost function
  • cost cost function
§Returns

New instance of Problem

Auto Trait Implementations§

§

impl<'a, GradientType, ConstraintType, CostType> Freeze for Problem<'a, GradientType, ConstraintType, CostType>
where CostType: Freeze, GradientType: Freeze,

§

impl<'a, GradientType, ConstraintType, CostType> RefUnwindSafe for Problem<'a, GradientType, ConstraintType, CostType>
where ConstraintType: RefUnwindSafe, CostType: RefUnwindSafe, GradientType: RefUnwindSafe,

§

impl<'a, GradientType, ConstraintType, CostType> Send for Problem<'a, GradientType, ConstraintType, CostType>
where ConstraintType: Sync, CostType: Send, GradientType: Send,

§

impl<'a, GradientType, ConstraintType, CostType> Sync for Problem<'a, GradientType, ConstraintType, CostType>
where ConstraintType: Sync, CostType: Sync, GradientType: Sync,

§

impl<'a, GradientType, ConstraintType, CostType> Unpin for Problem<'a, GradientType, ConstraintType, CostType>
where CostType: Unpin, GradientType: Unpin,

§

impl<'a, GradientType, ConstraintType, CostType> UnwindSafe for Problem<'a, GradientType, ConstraintType, CostType>
where ConstraintType: RefUnwindSafe, CostType: UnwindSafe, GradientType: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V