Struct argmin_core::ArgminBase

source ·
pub struct ArgminBase<'a, T, U, H> { /* private fields */ }
Expand description

Storage for data needed by most solvers

TODO: cur_cost, best_cost and target_cost should be U, but then initialization is difficult as it cannot be expected that each U has something like INFINITY and NEG_INFINITY

Implementations

Constructor

Return the KV for the initial logging

Return the KV for logging of the iterations

Reset self to its initial state.

This is dangerous the way it is implemented right now. This has to be done better. For instance, all old data needs to be kept in order to be able to actually go back to the initial state. Also, this method definitely needs to be kept up to date otherwise nasty bugs may happen.

Apply the operator to param

Compute the gradient at param

Compute the hessian at param

Modify a param with the modify method of operator.

Set the current parameter vector

Return the current parameter vector

Set the new best parameter vector

Return the current best parameter vector

Set the current cost function value

Return the current cost function value

Set the cost function value of the current best parameter vector

Return the cost function value of the current best parameter vector

Set the current gradient

Return the current gradient

Set the current hessian

Return the current hessian

Set the target cost function value

Return the target cost function value

Increment the number of iterations.

Return the current number of iterations

Increment the cost function evaluation count

Increaese the cost function evaluation count by a given value

Return the cost function evaluation count

Increment the gradient evaluation count

Increase the gradient evaluation count by a given value

Return the gradient evaluation count

Increment the hessian evaluation count

Increase the hessian evaluation count by a given value

Return the gradient evaluation count

Set the maximum number of iterations.

Return the maximum number of iterations

Set the TerminationReason

Return the TerminationReason

Return the textual representation of the TerminationReason

Return whether the algorithm has terminated or not

Return the result.

Set the total time needed by the solver

Return the total time

Add a logger to the list of loggers

Add a writer to the list of writers

Log a kv

Log a message and a kv

Write (TODO)

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.