[][src]Crate argmin_core

Argmin Optimizaton toolbox core

This crate contains the core functionality of argmin. If you just want to run an optimization method, this is not what you are looking for. However, if you want to implement your own solver based on the argmin architecture, you should find all necessary tools here.

TODOs:

  • Provide an example of how to implement a solver

Re-exports

pub extern crate failure;
pub extern crate failure_derive;

Modules

macros

Macros

Macros

check_param

Release an T from an Option<T> if it is not None. If it is None, return an ArgminError with a message that needs to be provided.

make_kv

Creates an ArgminKV at compile time in order to avoid pushing to the kv vector.

Structs

ArgminBase

Storage for data needed by most solvers

ArgminIterationData

The datastructure which is returned by the next_iter method of the ArgminNextIter trait.

ArgminKV

A simple key-value storage

ArgminLogger

Container for ArgminLoggers

ArgminResult

Return struct for all solvers.

ArgminSlogLogger

A logger based on slog

ArgminWriter
Error

The Error type, which can contain any failure.

NoOperator
WriteToFile

Enums

ArgminError
TerminationReason

Indicates why the optimization algorithm stopped

Traits

ArgminAdd

Add a T to self

ArgminDot

Dot/scalar product of T and self

ArgminInv

Compute the inverse (T) of self

ArgminLineSearch

Defines a common interface to line search methods. Requires that ArgminSolver is implemented for the line search method as well.

ArgminLog

Defince the interface every logger needs to expose

ArgminMul
ArgminNLCGBetaUpdate

Every method for the update of beta needs to implement this trait.

ArgminNextIter

Main part of every solver: next_iter computes one iteration of the algorithm and init is executed before these iterations. The init method comes with a default implementation which corresponds to doing nothing.

ArgminNorm

Compute the l2-norm (U) of self

ArgminOperator

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

ArgminScale

Scale self by a U

ArgminScaledAdd

Add a T scaled by an U to self

ArgminScaledSub

Subtract a T scaled by an U from self

ArgminSolver

Defines the interface to a solver. Usually, there is no need to implement this manually, use the argmin_derive crate instead.

ArgminSub

Subtract a T from self

ArgminTrustRegion

Defines a common interface to methods which calculate approximate steps for trust region methods. Requires that ArgminSolver is implemented as well.

ArgminWeightedDot

Dot/scalar product of T and self weighted by W (p^TWv)

ArgminWrite

Every writer (which is something that writes parameter vectors somewhere after each iteration) needs to implement this.

ArgminZero

Return param vector of all zeros (for now, this is a hack. It should be done better)