[][src]Trait yamakan::Optimizer

pub trait Optimizer {
    type Param;
    type Value;
    fn ask<R: Rng, G: IdGen>(
        &mut self,
        rng: R,
        idg: G
    ) -> Result<Obs<Self::Param>>;
fn tell(&mut self, obs: Obs<Self::Param, Self::Value>) -> Result<()>; }

This trait provides ask-and-tell interface for black-box optimization.

Associated Types

type Param

The parameter to be optimized.

type Value

The value obtained as a result of a parameter evaluation.

Loading content...

Required methods

fn ask<R: Rng, G: IdGen>(&mut self, rng: R, idg: G) -> Result<Obs<Self::Param>>

Asks the next parameter to be evaluated.

The evaluation result should be told to this optimizer.

fn tell(&mut self, obs: Obs<Self::Param, Self::Value>) -> Result<()>

Tells the result of an observation to this optimizer.

If there is an existing observation that has the same identifier, the state of the observation should be overwritten by the new one.

Errors

Some implementations may return an ErrorKind::UnknownObservation error if this optimizer does not known (or has not generated) the specified observation.

Loading content...

Implementors

impl<P, S> Optimizer for Nsga2Optimizer<P, S> where
    P: Domain,
    P::Point: Clone,
    S: Strategy<P>, 
[src]

type Param = P::Point

type Value = Vec<f64>

impl<P, V> Optimizer for RandomOptimizer<P, V> where
    P: Domain + Distribution<<P as Domain>::Point>, 
[src]

type Param = P::Point

type Value = V

impl<V> Optimizer for NelderMeadOptimizer<V> where
    V: Ord
[src]

type Param = Vec<f64>

type Value = V

Loading content...