Mundy: Multibody Nonlocal Dynamics Version of the Day
Loading...
Searching...
No Matches
pgd.hpp File Reference

Projected-gradient descent (PGD), a solver method shared by more than one problem. More...

Classes

struct  mundy::PGDResult< Scalar >
 Result of a projected-gradient solve: iteration count, final residual, and whether it converged. More...
struct  mundy::BBStepStrategy
 Barzilai-Borwein step-size policy for projected-gradient descent. More...
struct  mundy::PGDConfig< Scalar >
class  mundy::PGDState< Scalar, XVector, GradVector, XTmpVector, GradTmpVector >
class  mundy::PGDStrategy< StepPolicy, ResidualPolicy, Config >

Namespaces

namespace  mundy

Concepts

concept  mundy::ProjectedProblem
 The problem interface projected-gradient descent consumes: a backend, an operator A and linear term q defining the quadratic 0.5 x^T A x + q^T x, a convex space to project onto, and a mutable operator workspace.

Functions

Projected-gradient descent (PGD) result
template<class Scalar>
std::ostream & mundy::operator<< (std::ostream &os, const PGDResult< Scalar > result)
 Write a PGDResult to an ostream.
Factory functions
template<class StepPolicy, class ResidualPolicy, class Scalar>
auto mundy::make_pgd_solution_strategy (StepPolicy &&step_policy, ResidualPolicy &&residual_policy, const PGDConfig< Scalar > &cfg={})
template<class Scalar>
auto mundy::make_pgd_solution_strategy (const PGDConfig< Scalar > &cfg={})
template<class XVector, class GradVector, class XTmpVector, class GradTmpVector>
auto mundy::make_pgd_state (XVector &&x, GradVector &&grad, XTmpVector &&x_tmp, GradTmpVector &&grad_tmp)

Detailed Description

PGD is a capability header, not a problem header: it holds the projected-gradient method (Config/State/Strategy, its step policy, its result) with no problem type and no solve_* verb. A problem that PGD applies to #includes this header and provides its own solve_* verb (e.g. solve_cqpp in cqpp.hpp). PGD consumes the ProjectedProblem interface below, so any problem satisfying that interface can be driven by it without PGD naming the problem.