Trait optimization_engine::constraints::Constraint[][src]

pub trait Constraint {
    fn project(&self, x: &mut [f64]);
fn is_convex(&self) -> bool; }
Expand description

A set which can be used as a constraint

This trait defines an abstract function that allows to compute projections on sets; this is implemented by a series of structures (see below for details)

Required methods

Projection onto the set, that is,

$$ \Pi_C(v) = \mathrm{argmin}_{z\in C}\Vert{}z-v{}\Vert $$

Arguments
  • x: The given vector $x$ is updated with the projection on the set

Returns true if and only if the set is convex

Implementors