Mundy: Multibody Nonlocal Dynamics Version of the Day
Loading...
Searching...
No Matches
mundy::BBStepStrategy Struct Reference

Barzilai-Borwein step-size policy for projected-gradient descent. More...

#include <pgd.hpp>

Public Member Functions

template<typename Backend, typename XOldVector, typename GradOldVector, typename XVector, typename GradVector, typename ReductionScalar = impl::vector_value_type<XVector>>
ReductionScalar operator() (const Backend &backend, const XOldVector &x_old, const GradOldVector &grad_old, const XVector &x, const GradVector &grad, ReductionScalar current_step) const

Detailed Description

With s = x - x_old and y = grad - grad_old = A s, the step is s^T s / s^T A s, the inverse of A's Rayleigh quotient along s. A positive semi-definite A makes s^T A s non-negative; where it is zero (s = 0, or A has no curvature along s), the current step is kept.

Member Function Documentation

◆ operator()()

template<typename Backend, typename XOldVector, typename GradOldVector, typename XVector, typename GradVector, typename ReductionScalar = impl::vector_value_type<XVector>>
ReductionScalar mundy::BBStepStrategy::operator() ( const Backend & backend,
const XOldVector & x_old,
const GradOldVector & grad_old,
const XVector & x,
const GradVector & grad,
ReductionScalar current_step ) const
inline