alpaqa 1.0.0a11
Nonconvex constrained optimization
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
SteihaugCG< Conf > Struct Template Reference

#include <alpaqa/accelerators/steihaugcg.hpp>

Detailed Description

template<Config Conf>
struct alpaqa::SteihaugCG< Conf >

Steihaug conjugate gradients procedure based on https://github.com/scipy/scipy/blob/583e70a50573169fc352b5dc6d94588a97c7389a/scipy/optimize/_trustregion_ncg.py#L44.

Definition at line 20 of file steihaugcg.hpp.

+ Collaboration diagram for SteihaugCG< Conf >:

Public Types

using Params = SteihaugCGParams< config_t >
 

Public Member Functions

 SteihaugCG ()=default
 
 SteihaugCG (const Params &params)
 
void resize (length_t n)
 
template<class HessFun >
real_t solve (const auto &grad, const HessFun &hess_prod, real_t trust_radius, rvec step) const
 

Static Public Member Functions

static auto get_boundaries_intersections (crvec z, crvec d, real_t trust_radius)
 Solve the scalar quadratic equation ||z + t d|| == trust_radius.
 

Public Attributes

Params params
 
vec z
 
vec r
 
vec d
 
vec Bd
 
vec work_eval
 

Member Typedef Documentation

◆ Params

using Params = SteihaugCGParams<config_t>

Definition at line 23 of file steihaugcg.hpp.

Constructor & Destructor Documentation

◆ SteihaugCG() [1/2]

SteihaugCG ( )
default

◆ SteihaugCG() [2/2]

SteihaugCG ( const Params params)
inline

Definition at line 27 of file steihaugcg.hpp.

Member Function Documentation

◆ resize()

void resize ( length_t  n)
inline

Definition at line 31 of file steihaugcg.hpp.

+ Here is the caller graph for this function:

◆ solve()

real_t solve ( const auto &  grad,
const HessFun &  hess_prod,
real_t  trust_radius,
rvec  step 
) const
inline

Definition at line 40 of file steihaugcg.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_boundaries_intersections()

static auto get_boundaries_intersections ( crvec  z,
crvec  d,
real_t  trust_radius 
)
inlinestatic

Solve the scalar quadratic equation ||z + t d|| == trust_radius.

This is like a line-sphere intersection. Return the two values of t, sorted from low to high.

Definition at line 122 of file steihaugcg.hpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ params

Params params

Definition at line 24 of file steihaugcg.hpp.

◆ z

vec z
mutable

Definition at line 29 of file steihaugcg.hpp.

◆ r

vec r

Definition at line 29 of file steihaugcg.hpp.

◆ d

vec d

Definition at line 29 of file steihaugcg.hpp.

◆ Bd

vec Bd

Definition at line 29 of file steihaugcg.hpp.

◆ work_eval

vec work_eval

Definition at line 29 of file steihaugcg.hpp.


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