pub enum ObjectiveKind<S: Scalar> {
Linear {
c: Vec<S>,
},
Quadratic {
h_row_major: Vec<S>,
c: Vec<S>,
n: usize,
},
Minimize {
func: ScalarFn<S>,
grad: Option<VectorFn<S>>,
},
LeastSquares {
residual: VectorFn<S>,
jacobian: Option<VectorFn<S>>,
n_residuals: usize,
},
MultiObjective {
funcs: Vec<ScalarFn<S>>,
},
}Expand description
Whether the objective is a scalar function or a least-squares residual.
Variants§
Linear
Linear objective: min c^T x
Quadratic
Quadratic objective: min 1/2 x^T H x + c^T x
H stored row-major as Vec<S> (n*n), must be positive semi-definite.
Minimize
LeastSquares
MultiObjective
Multi-objective: minimize [f1(x), f2(x), …] simultaneously.
Auto Trait Implementations§
impl<S> Freeze for ObjectiveKind<S>
impl<S> !RefUnwindSafe for ObjectiveKind<S>
impl<S> !Send for ObjectiveKind<S>
impl<S> !Sync for ObjectiveKind<S>
impl<S> Unpin for ObjectiveKind<S>where
S: Unpin,
impl<S> UnsafeUnpin for ObjectiveKind<S>
impl<S> !UnwindSafe for ObjectiveKind<S>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more