SyTen
syten::GradientOpt Namespace Reference

Namespace for gradient-based optimisers. More...

Functions

template<typename Value , typename FunctionEval , typename GradientEval >
auto gradient_descent (Value x, FunctionEval func, GradientEval grad, SRDef step_size, Index num_steps)
 Straightforward gradient descent. More...
 
template<typename Value , typename FunctionEval , typename GradientEval , typename IsImprovement >
auto gradient_descent_adaptive_stepsize (Value x, FunctionEval func, GradientEval grad, IsImprovement improv, Index num_steps)
 Gradient descent with adaptive stepsize. More...
 
template<typename X , typename FunctionEval , typename GradientEval , typename LinesearchEval , typename RandomStep , typename Terminator >
auto gradient_descent_linesearch (X x, FunctionEval func, GradientEval grad, LinesearchEval lin, RandomStep rand, Terminator terminate, Index num_steps=100, Index ls_num_steps=50, SRDef ls_lower=0, SRDef ls_upper=1)
 Attempt at a gradient descent with linesearch. More...
 
template<typename Hp >
SRDef linesearch (Hp h_hp, SRDef lower, SRDef upper, Index const max_steps)
 Attempt at a bisecting line search. More...
 

Detailed Description

Namespace for gradient-based optimisers.