Trait argmin::core::ArgminOp [−][src]
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 Param: Clone + Serialize + DeserializeOwned
[src]
Type of the parameter vector
type Output: Clone + Serialize + DeserializeOwned
[src]
Output of the operator
type Hessian: Clone + Serialize + DeserializeOwned
[src]
Type of Hessian
type Jacobian: Clone + Serialize + DeserializeOwned
[src]
Type of Jacobian
type Float: ArgminFloat
[src]
Precision of floats
Provided methods
fn apply(&self, _param: &Self::Param) -> Result<Self::Output, Error>
[src]
Applies the operator/cost function to parameters
fn gradient(&self, _param: &Self::Param) -> Result<Self::Param, Error>
[src]
Computes the gradient at the given parameters
fn hessian(&self, _param: &Self::Param) -> Result<Self::Hessian, Error>
[src]
Computes the Hessian at the given parameters
fn jacobian(&self, _param: &Self::Param) -> Result<Self::Jacobian, Error>
[src]
Computes the Hessian at the given parameters
fn modify(
&self,
_param: &Self::Param,
_extent: Self::Float
) -> Result<Self::Param, Error>
[src]
&self,
_param: &Self::Param,
_extent: Self::Float
) -> Result<Self::Param, Error>
Modifies a parameter vector. Comes with a variable that indicates the "degree" of the modification.
Implementors
impl ArgminOp for MinimalNoOperator
[src]
type Param = Vec<f64>
type Output = f64
type Hessian = Vec<Vec<f64>>
type Jacobian = Vec<f64>
type Float = f64
fn apply(&self, _p: &Self::Param) -> Result<Self::Output, Error>
[src]
Do nothing, really.
fn gradient(&self, _p: &Self::Param) -> Result<Self::Param, Error>
[src]
Do nothing, really.
fn hessian(&self, _p: &Self::Param) -> Result<Self::Hessian, Error>
[src]
Do nothing, really.
fn modify(&self, _p: &Self::Param, _t: f64) -> Result<Self::Param, Error>
[src]
Do nothing, really.
impl<O: ArgminOp> ArgminOp for OpWrapper<O>
[src]
The OpWrapperArgminOp
type Param = O::Param
type Output = O::Output
type Hessian = O::Hessian
type Jacobian = O::Jacobian
type Float = O::Float
fn apply(&self, param: &Self::Param) -> Result<Self::Output, Error>
[src]
fn gradient(&self, param: &Self::Param) -> Result<Self::Param, Error>
[src]
fn hessian(&self, param: &Self::Param) -> Result<Self::Hessian, Error>
[src]
fn jacobian(&self, param: &Self::Param) -> Result<Self::Jacobian, Error>
[src]
fn modify(
&self,
param: &Self::Param,
extent: Self::Float
) -> Result<Self::Param, Error>
[src]
&self,
param: &Self::Param,
extent: Self::Float
) -> Result<Self::Param, Error>
impl<T, U, H, J, F> ArgminOp for NoOperator<T, U, H, J, F> where
T: Clone + Default + Debug + Send + Sync + Serialize + DeserializeOwned,
U: Clone + Default + Debug + Send + Sync + Serialize + DeserializeOwned,
H: Clone + Default + Debug + Send + Sync + Serialize + DeserializeOwned,
J: Clone + Default + Debug + Send + Sync + Serialize + DeserializeOwned,
F: ArgminFloat,
[src]
T: Clone + Default + Debug + Send + Sync + Serialize + DeserializeOwned,
U: Clone + Default + Debug + Send + Sync + Serialize + DeserializeOwned,
H: Clone + Default + Debug + Send + Sync + Serialize + DeserializeOwned,
J: Clone + Default + Debug + Send + Sync + Serialize + DeserializeOwned,
F: ArgminFloat,
type Param = T
type Output = U
type Hessian = H
type Jacobian = J
type Float = F
fn apply(&self, _p: &Self::Param) -> Result<Self::Output, Error>
[src]
Do nothing, really.
fn gradient(&self, _p: &Self::Param) -> Result<Self::Param, Error>
[src]
Do nothing, really.
fn hessian(&self, _p: &Self::Param) -> Result<Self::Hessian, Error>
[src]
Do nothing, really.
fn modify(
&self,
_p: &Self::Param,
_t: Self::Float
) -> Result<Self::Param, Error>
[src]
&self,
_p: &Self::Param,
_t: Self::Float
) -> Result<Self::Param, Error>
Do nothing, really.