Crate argmin_core[][src]

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 ctrlc;
pub extern crate failure;
pub extern crate failure_derive;

Modules

macros

Macros

Macros

box_clone

Implements the box_clone method of the ArgminOperator trait in order to be able to clone a Box<ArgminOperator>.

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.

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

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

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

ArgminWrite

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