Developer documentation
Version 3.0.3-105-gd3941f44
MR::Math::GradientDescent< Function, UpdateFunctor > Class Template Reference

Computes the minimum of a function using a gradient descent approach. More...

#include "math/gradient_descent.h"

Protected Member Functions

value_type evaluate_func (const Eigen::Matrix< value_type, Eigen::Dynamic, 1 > &newx, Eigen::Matrix< value_type, Eigen::Dynamic, 1 > &newg, bool verbose=false)
 
void compute_normg_and_step_unscaled ()
 

Protected Attributes

Function & func
 
UpdateFunctor update_func
 
const value_type step_up
 
const value_type step_down
 
bool verbose
 
std::string delim
 
size_t niter
 
Eigen::Matrix< value_type, Eigen::Dynamic, 1 > x
 
Eigen::Matrix< value_type, Eigen::Dynamic, 1 > x2
 
Eigen::Matrix< value_type, Eigen::Dynamic, 1 > g
 
Eigen::Matrix< value_type, Eigen::Dynamic, 1 > g2
 
Eigen::Matrix< value_type, Eigen::Dynamic, 1 > preconditioner_weights
 
value_type f
 
value_type dt
 
value_type normg
 
value_type step_unscaled
 
size_t nfeval
 

Detailed Description

template<class Function, class UpdateFunctor = LinearUpdate>
class MR::Math::GradientDescent< Function, UpdateFunctor >

Computes the minimum of a function using a gradient descent approach.

Definition at line 52 of file gradient_descent.h.

Member Function Documentation

◆ compute_normg_and_step_unscaled()

template<class Function , class UpdateFunctor = LinearUpdate>
void MR::Math::GradientDescent< Function, UpdateFunctor >::compute_normg_and_step_unscaled ( )
inlineprotected

Definition at line 229 of file gradient_descent.h.

◆ evaluate_func()

template<class Function , class UpdateFunctor = LinearUpdate>
value_type MR::Math::GradientDescent< Function, UpdateFunctor >::evaluate_func ( const Eigen::Matrix< value_type, Eigen::Dynamic, 1 > &  newx,
Eigen::Matrix< value_type, Eigen::Dynamic, 1 > &  newg,
bool  verbose = false 
)
inlineprotected

Definition at line 216 of file gradient_descent.h.

Member Data Documentation

◆ delim

template<class Function , class UpdateFunctor = LinearUpdate>
std::string MR::Math::GradientDescent< Function, UpdateFunctor >::delim
protected

Definition at line 210 of file gradient_descent.h.

◆ dt

template<class Function , class UpdateFunctor = LinearUpdate>
value_type MR::Math::GradientDescent< Function, UpdateFunctor >::dt
protected

Definition at line 213 of file gradient_descent.h.

◆ f

template<class Function , class UpdateFunctor = LinearUpdate>
value_type MR::Math::GradientDescent< Function, UpdateFunctor >::f
protected

Definition at line 213 of file gradient_descent.h.

◆ func

template<class Function , class UpdateFunctor = LinearUpdate>
Function& MR::Math::GradientDescent< Function, UpdateFunctor >::func
protected

Definition at line 206 of file gradient_descent.h.

◆ g

template<class Function , class UpdateFunctor = LinearUpdate>
Eigen::Matrix<value_type, Eigen::Dynamic, 1> MR::Math::GradientDescent< Function, UpdateFunctor >::g
protected

Definition at line 212 of file gradient_descent.h.

◆ g2

template<class Function , class UpdateFunctor = LinearUpdate>
Eigen::Matrix<value_type, Eigen::Dynamic, 1> MR::Math::GradientDescent< Function, UpdateFunctor >::g2
protected

Definition at line 212 of file gradient_descent.h.

◆ nfeval

template<class Function , class UpdateFunctor = LinearUpdate>
size_t MR::Math::GradientDescent< Function, UpdateFunctor >::nfeval
protected

Definition at line 214 of file gradient_descent.h.

◆ niter

template<class Function , class UpdateFunctor = LinearUpdate>
size_t MR::Math::GradientDescent< Function, UpdateFunctor >::niter
protected

Definition at line 211 of file gradient_descent.h.

◆ normg

template<class Function , class UpdateFunctor = LinearUpdate>
value_type MR::Math::GradientDescent< Function, UpdateFunctor >::normg
protected

Definition at line 213 of file gradient_descent.h.

◆ preconditioner_weights

template<class Function , class UpdateFunctor = LinearUpdate>
Eigen::Matrix<value_type, Eigen::Dynamic, 1> MR::Math::GradientDescent< Function, UpdateFunctor >::preconditioner_weights
protected

Definition at line 212 of file gradient_descent.h.

◆ step_down

template<class Function , class UpdateFunctor = LinearUpdate>
const value_type MR::Math::GradientDescent< Function, UpdateFunctor >::step_down
protected

Definition at line 208 of file gradient_descent.h.

◆ step_unscaled

template<class Function , class UpdateFunctor = LinearUpdate>
value_type MR::Math::GradientDescent< Function, UpdateFunctor >::step_unscaled
protected

Definition at line 213 of file gradient_descent.h.

◆ step_up

template<class Function , class UpdateFunctor = LinearUpdate>
const value_type MR::Math::GradientDescent< Function, UpdateFunctor >::step_up
protected

Definition at line 208 of file gradient_descent.h.

◆ update_func

template<class Function , class UpdateFunctor = LinearUpdate>
UpdateFunctor MR::Math::GradientDescent< Function, UpdateFunctor >::update_func
protected

Definition at line 207 of file gradient_descent.h.

◆ verbose

template<class Function , class UpdateFunctor = LinearUpdate>
bool MR::Math::GradientDescent< Function, UpdateFunctor >::verbose
protected

Definition at line 209 of file gradient_descent.h.

◆ x

template<class Function , class UpdateFunctor = LinearUpdate>
Eigen::Matrix<value_type, Eigen::Dynamic, 1> MR::Math::GradientDescent< Function, UpdateFunctor >::x
protected

Definition at line 212 of file gradient_descent.h.

◆ x2

template<class Function , class UpdateFunctor = LinearUpdate>
Eigen::Matrix<value_type, Eigen::Dynamic, 1> MR::Math::GradientDescent< Function, UpdateFunctor >::x2
protected

Definition at line 212 of file gradient_descent.h.


The documentation for this class was generated from the following file: