alpaqa 1.0.0a17
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 39 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

template<Config Conf>
using Params = SteihaugCGParams<config_t>

Definition at line 42 of file steihaugcg.hpp.

Constructor & Destructor Documentation

◆ SteihaugCG() [1/2]

template<Config Conf>
SteihaugCG ( )
default

◆ SteihaugCG() [2/2]

template<Config Conf>
SteihaugCG ( const Params params)
inline

Definition at line 46 of file steihaugcg.hpp.

Member Function Documentation

◆ resize()

template<Config Conf>
void resize ( length_t  n)
inline

Definition at line 50 of file steihaugcg.hpp.

+ Here is the caller graph for this function:

◆ solve()

template<Config Conf>
template<class HessFun >
real_t solve ( const auto grad,
const HessFun hess_prod,
real_t  trust_radius,
rvec  step 
) const
inline

Definition at line 59 of file steihaugcg.hpp.

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

◆ get_boundaries_intersections()

template<Config Conf>
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 146 of file steihaugcg.hpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ params

template<Config Conf>
Params params

Definition at line 43 of file steihaugcg.hpp.

◆ z

template<Config Conf>
vec z
mutable

Definition at line 48 of file steihaugcg.hpp.

◆ r

template<Config Conf>
vec r

Definition at line 48 of file steihaugcg.hpp.

◆ d

template<Config Conf>
vec d

Definition at line 48 of file steihaugcg.hpp.

◆ Bd

template<Config Conf>
vec Bd

Definition at line 48 of file steihaugcg.hpp.

◆ work_eval

template<Config Conf>
vec work_eval

Definition at line 48 of file steihaugcg.hpp.


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