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

pub trait Constraint {
    fn project(&self, x: &mut [f64]);
}

A set which can be used as a constraint

This trait defines an abstract function that allows to compute projections on the set

Required methods

fn project(&self, x: &mut [f64])

Projection onto the set

The given vector x is updated with the projection on the set

Loading content...

Implementors

impl Constraint for NoConstraints[src]

impl<'a> Constraint for Ball2<'a>[src]

impl<'a> Constraint for CartesianProduct<'a>[src]

fn project(&self, x: &mut [f64])[src]

Project onto Cartesian product of constraints

The given vector x is updated with the projection on the set

Panics

The method will panic if the dimension of x is not equal to the dimension of the Cartesian product (see dimension())

impl<'a> Constraint for Rectangle<'a>[src]

Loading content...