Trait argmin::core::ArgminOp[][src]

pub trait ArgminOp {
    type Param: Clone + SerializeAlias + DeserializeOwnedAlias;
    type Output: Clone + SerializeAlias + DeserializeOwnedAlias;
    type Hessian: Clone + SerializeAlias + DeserializeOwnedAlias;
    type Jacobian: Clone + SerializeAlias + DeserializeOwnedAlias;
    type Float: ArgminFloat;
    fn apply(&self, _param: &Self::Param) -> Result<Self::Output, Error> { ... }
fn gradient(&self, _param: &Self::Param) -> Result<Self::Param, Error> { ... }
fn hessian(&self, _param: &Self::Param) -> Result<Self::Hessian, Error> { ... }
fn jacobian(&self, _param: &Self::Param) -> Result<Self::Jacobian, Error> { ... }
fn modify(
        &self,
        _param: &Self::Param,
        _extent: Self::Float
    ) -> Result<Self::Param, Error> { ... } }
Expand description

This trait needs to be implemented for every operator/cost function.

It is required to implement the apply method, all others are optional and provide a default implementation which is essentially returning an error which indicates that the method has not been implemented. Those methods (gradient and modify) only need to be implemented if the uses solver requires it.

Associated Types

Type of the parameter vector

Output of the operator

Type of Hessian

Type of Jacobian

Precision of floats

Provided methods

Applies the operator/cost function to parameters

Computes the gradient at the given parameters

Computes the Hessian at the given parameters

Computes the Hessian at the given parameters

Modifies a parameter vector. Comes with a variable that indicates the “degree” of the modification.

Implementors