| auto syten::GradientOpt::gradient_descent | ( | Value | x, |
| FunctionEval | func, | ||
| GradientEval | grad, | ||
| SRDef | step_size, | ||
| Index | num_steps | ||
| ) |
Straightforward gradient descent.
| Value | Domain value type |
| FunctionEval | function evaluation type, takes a Value object and returns an object of (unnamed) type X |
| GradientEval | gradient evaluation type, takes a type X and the associated Value object and returns a type X |
The domain value type must support SDef * Value → Value and Value += Value.
| x | initial value |
| func | function object used to evaluate the function at a specific point |
| grad | gradient object used to evaluate the gradient at a specific function value and point |
| step_size | step size to take during the descent |
| num_steps | number of steps to take |
References std::make_tuple(), and std::move().
Here is the call graph for this function: