pub enum FunctionKind {
Quadratic {
q: Vec<Vec<f64>>,
b: Vec<f64>,
c: f64,
},
Linear {
a: Vec<f64>,
b: f64,
},
Norm {
p: f64,
},
Indicator,
MaxAffine {
pieces: Vec<(Vec<f64>, f64)>,
},
}Expand description
The kind / parametrisation of a convex function f : R^n -> R.
Variants§
Quadratic
Quadratic: f(x) = (1/2) x^T Q x + b^T x + c.
Linear
Linear: f(x) = a^T x + b.
Norm
p-norm: f(x) = ||x||_p.
Indicator
Indicator of the domain convex set (0 inside, +inf outside).
MaxAffine
Max-affine function: f(x) = max_i (a_i^T x + b_i).
Trait Implementations§
Source§impl Clone for FunctionKind
impl Clone for FunctionKind
Source§fn clone(&self) -> FunctionKind
fn clone(&self) -> FunctionKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FunctionKind
impl RefUnwindSafe for FunctionKind
impl Send for FunctionKind
impl Sync for FunctionKind
impl Unpin for FunctionKind
impl UnsafeUnpin for FunctionKind
impl UnwindSafe for FunctionKind
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